# Function AreaChart
AreaChart(
props
,context
?):null
|ReactElement
<any
,any
>
A React component similar to a LineChart, but with filled in areas under each line and an option to display them as stacked. More info on Sisense Documentation page.
# Parameters
Parameter | Type | Description |
---|---|---|
props | AreaChartProps | Area chart properties |
context ? | any | - |
# Returns
null
| ReactElement
< any
, any
>
Area Chart component
# Example
An example of using the component to visualize the Sample ECommerce
data source:
<AreaChart
dataSet={DM.DataSource}
dataOptions={{
category: [DM.Commerce.Date.Years],
value: [measures.sum(DM.Commerce.Revenue)],
breakBy: [DM.Commerce.Gender],
}}
styleOptions={{ subtype: 'area/stacked' }}
filters={[filters.members(DM.Commerce.Gender, ['Female', 'Male'])]}
onDataPointClick={(point, nativeEvent) => {
console.log('clicked', point, nativeEvent);
}}
/>
#
