# Function IndicatorChart
IndicatorChart(
props
,context
?):null
|ReactElement
<any
,any
>
A React component that displays a single value. See Indicator for more information.
# Parameters
Parameter | Type | Description |
---|---|---|
props | IndicatorChartProps | Indicator chart properties |
context ? | any | - |
# Returns
null
| ReactElement
< any
, any
>
Indicator Chart component
# Example
An example of using the component to visualize the Sample ECommerce
data source:
<IndicatorChart
dataSet={DM.DataSource}
dataOptions={{
value: [
{
column: measures.sum(DM.Commerce.Revenue),
numberFormatConfig: {
name: 'Numbers',
decimalScale: 2,
trillion: true,
billion: true,
million: true,
kilo: true,
thousandSeparator: true,
prefix: false,
symbol: '$',
},
},
],
secondary: [],
min: [measures.constant(0)],
max: [measures.constant(125000000)],
}}
filters={[filters.greaterThan(DM.Commerce.Revenue, 1000)]}
styleOptions={{
indicatorComponents: {
title: {
shouldBeShown: true,
text: 'Total Revenue',
},
secondaryTitle: {
text: '',
},
ticks: {
shouldBeShown: true,
},
labels: {
shouldBeShown: true,
},
},
subtype: 'indicator/gauge',
skin: 1,
}}
/>
#
