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),
    category: DM.Commerce.Date.Months,
    comparison: { type: 'previous-period' },
  }}
/>

Properties

category

category?: Column | StyledColumn

Sets the card's category (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

category: DM.Commerce.Date.Months

comparison

comparison?: KpiComparison

Configures what the headline is compared against.

Example

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

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 category is set.

Example

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

Default Value

'last'
Last Updated: