Widgets & charts
Five widget types. A widget's renderConfig shape depends on its type.
kpi_card
interface KpiCardRenderConfig {
format?: 'number' | 'currency' | 'percentage';
currencySymbol?: string; // falls back to settings.numberFormat.currencySymbol
prefix?: string;
suffix?: string;
comparison?: { field: string; type: 'percentage' | 'absolute' };
variant?: 'solid' | 'gradient';
icon?: 'trending_up' | 'dollar' | 'users' | 'package' | 'activity' | 'percent' | 'gauge';
}
echarts
interface EchartsRenderConfig {
chartType: ChartType; // see the catalog below
smooth?: boolean; // line/area
showArea?: boolean; // line/area
stacked?: boolean; // bar
seriesStyles?: { field: string; color?: string; aggregation?: Aggregation }[];
xAxisLabel?: string;
yAxisLabel?: string;
legendPosition?: 'top' | 'bottom' | 'none';
showGridLines?: boolean;
gaugeMin?: number; // gauge only
gaugeMax?: number; // gauge only
funnelSort?: 'ascending' | 'descending' | 'none'; // funnel only
showInsight?: boolean; // auto-written English caption, default true
echartsOptionsCustom?: Record<string, unknown>; // merged over the generated option
}
The 25-chart catalog
| Group | Chart types |
|---|---|
| Trend | line, area, stacked_area |
| Comparison | bar, horizontal_bar, stacked_bar, waterfall |
| Part-to-whole | pie, donut, rose, treemap, sunburst |
| Correlation | scatter, bubble |
| Multi-dimensional | radar, polar_bar |
| Distribution licensed | heatmap, calendar_heatmap, boxplot |
| Relationships & flow licensed | graph, sankey, parallel |
| Specialized licensed | gauge, funnel, candlestick |
Sub-categories. Standard-axis charts (line/bar/…) accept a second dimension: the first becomes the x-axis, the second pivots into one series per value (e.g. region × product). Treemap and sunburst instead accept an ordered list of dimensions — each one nests a level deeper (region → product → SKU), with no limit on depth.
graph and sankey read dimensions[0] as the
source field and dimensions[1] as the target field, with the first metric as
edge weight. candlestick reads its four metrics in
[open, close, low, high] order.
Story charts
spiral: one time dimension and one metric.spiralTurnsets the periods per turn (default 25).barcode: entity dimension, then time dimension, and one metric.barcodeSortisfirstortotal.radial_bars: one spoke per value of the first dimension, optionally stacked by a second. Pair with thedecadeormonth_of_yeargranularities.range_bars: one label dimension and two metrics, start and end.rangeDomainfixes the shared axis.beeswarm: one label dimension and a metric, one dot per item; log axis only when every value is positive and spans 30× or more. An optional second dimension colours the dots by group;selectedNameenlarges and labels one item.hexmap: world tile map, one equal hexagon per country. Dimensions[country]+ metric (colour by rank), or[country, level]withhexLevels/hexLevelColors(Leader…Blocker, A–E). Countries without data stay grey.stripes: warming stripes, one band per period coloured by distance from the average. Dimensions[period]+ metric.slope: every entity from the first period to the last; risers and fallers in two colours. Dimensions[entity, period]+ metric.dumbbell: two values per entity (first and last of the second dimension) joined by a bar. Dimensions[entity, pair]+ metric.lollipop: stem and dot, sorted, up to 25 categories. Dimensions[category]+ metric.bump: rank of each entity per period (top 10 in the latest), who overtook whom. Dimensions[period, entity]+ metric.waffle: 100 squares split by share (largest-remainder rounding, beyond 5 parts the rest is grouped). Dimensions[category]+ metric.ridgeline: one smoothed distribution per group (up to 12), stacked hills. Dimensions[group]+ metric withaggregation: 'none'.small_multiples: one mini line per entity (up to 12) on a shared scale. Dimensions[period, entity]+ metric.diverging_bar: gains to one side, losses to the other, sorted. Dimensions[category]+ metric.packed_bubbles: one circle per item, area by value, packed together; optional second dimension colours by group. Dimensions[item, group?]+ metric.chord: source and target dimensions plus one metric for ribbon thickness.
stacked_area accepts streamCentered: true for a centred stream. spiral also takes a second dimension to stack by, and spiralCallouts to label its peaks.
table
interface TableRenderConfig {
columns: TableColumn[];
virtualScroll?: boolean; // windows over the full filtered set client-side
showQuickFilter?: boolean;
striped?: boolean;
compact?: boolean;
rowClickable?: boolean; // emits a row_click DashboardActionEvent
defaultSort?: { field: string; direction: 'asc' | 'desc' };
rowHeight?: number; // default 36 (28 when compact)
}
interface TableColumn {
field: string;
header: string;
width?: number;
align?: 'left' | 'center' | 'right';
sortable?: boolean;
format?: 'text' | 'number' | 'currency' | 'percentage' | 'date' | 'chip' | 'image';
decimals?: number; // number/currency/percentage, default 2
pinned?: boolean;
colorField?: string; // another field holding a CSS color for this cell/chip
}
format: 'chip' renders the value as a colored pill — explicit color via
colorField, or a deterministic hash of the text when unset.
format: 'image' renders the cell value as a thumbnail <img> src.
filter_panel
interface FilterPanelRenderConfig {
filterRefIds: string[]; // which globalFilters this panel renders controls for
}
map
mode: 'choropleth': the first dimension holds countries (ISO alpha-2 or alpha-3, English or Italian names), an optional second time dimension adds a play control, and one metric sets the color. Values that aren't countries are listed under the map. mode: 'points': raw rows with latField, lngField, and optional labelField, colorField, sizeField.
The world geometry (Natural Earth 1:110m) loads on first use. For other maps call registerGeo(name, geojson) and set mapName; feature properties.name must match your data.
scenario
Sliders that recompute a metric live, without re-running the query. dataQuery: an optional time dimension (named in timeField), an optional category dimension, one metric. Each entry in levers has a kind:
category: scales one member's contribution.factor: scales one term of an exact identity (revenue = units × price).growth: adds growth per period to the projected part.driver: moves a correlated metric through a fittedslope. This is an association, not causation, and the widget says so.
With a time axis, levers act on the projected periods only. The projection is a straight line through the last 12 periods: a neutral baseline for comparing levers, not a forecast. Slider positions are stored in renderConfig.levers and saved with the dashboard.
markdown
interface MarkdownRenderConfig {
content: string; // headings, **bold**, *italic*, [links](url) — minimal, dependency-free
}