generate_area_chart
Create area charts to visualize data trends over continuous variables like time, showing cumulative values and relationships such as distance from velocity-time data.
Instructions
Generate a area chart to show data trends under continuous independent variables and observe the overall data trend, such as, displacement = velocity (average or instantaneous) × time: s = v × t. If the x-axis is time (t) and the y-axis is velocity (v) at each moment, an area chart allows you to observe the trend of velocity over time and infer the distance traveled by the area's size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Data for area chart, it should be an array of objects, each object contains a `time` field and a `value` field, such as, [{ time: '2015', value: 23 }, { time: '2016', value: 32 }], when stacking is needed for area, the data should contain a `group` field, such as, [{ time: '2015', value: 23, group: 'A' }, { time: '2015', value: 32, group: 'B' }]. | |
| stack | No | Whether stacking is enabled. When enabled, area charts require a 'group' field in the data. | |
| style | No | Style configuration for the chart with a JSON object, optional. | |
| theme | No | Set the theme for the chart, optional, default is 'default'. | default |
| width | No | Set the width of chart, default is 600. | |
| height | No | Set the height of chart, default is 400. | |
| title | No | Set the title of chart. | |
| axisXTitle | No | Set the x-axis title of chart. | |
| axisYTitle | No | Set the y-axis title of chart. |