# Function ChartWidget
ChartWidget(
props
,context
?):null
|ReactElement
<any
,any
>
The Chart Widget component extending the Chart component to support advanced BI capabilities such as drilldown.
# Parameters
Parameter | Type | Description |
---|---|---|
props | ChartWidgetProps | ChartWidget properties |
context ? | any | - |
# Returns
null
| ReactElement
< any
, any
>
ChartWidget component representing a chart type as specified in ChartWidgetProps.
chartType
# Example
Example of using the ChartWidget
component to
plot a bar chart of the Sample ECommerce
data source hosted in a Sisense instance.
Drill-down capability is enabled.
<ChartWidget
dataSource={DM.DataSource}
chartType="bar"
dataOptions={{
category: [DM.Category.Category],
value: [measures.sum(DM.Commerce.Revenue)],
breakBy: [],
}}
drilldownOptions={{
drilldownCategories: [DM.Commerce.AgeRange, DM.Commerce.Gender, DM.Commerce.Condition],
}}
/>
#
