sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Interface KpiChartDataOptions Beta

Configuration for how to query aggregate data and assign data to a KPI chart.

Example

<KpiChart
  dataSet={DM.DataSource}
  dataOptions={{
    value: measureFactory.sum(DM.Commerce.Revenue),
    trend: DM.Commerce.Date.Months,
    comparison: { type: 'previous-period' },
  }}
/>

Properties

comparison

comparison?: KpiComparison

Configures what the headline is compared against.

Example

comparison: { type: 'target', target: 10000 }

trend

trend?: Column | StyledColumn

Sets the card's trend axis (typically a date dimension): enables the sparkline, the current-period caption, the 'previous-period' comparison, and the valueMode semantics. Granularity comes from the column.

Example

trend: DM.Commerce.Date.Months

value

value: CalculatedMeasureColumn | MeasureColumn | StyledMeasureColumn

Primary measure — the headline KPI value. Conditional coloring via color on the styled measure.


valueMode

valueMode?: KpiValueMode

Selects which number is the headline when trend is set.

Example

valueMode: 'total' // aggregate over the whole period instead of the last trend bucket

Default Value

'last'
Last Updated: