generate_area_chart
Generate an area chart to visualize data trends over continuous variables like time, showing overall patterns and cumulative effects. Supports multiple series, stacking, and export to PNG, SVG, or ECharts option.
Instructions
Generate an 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 |
|---|---|---|---|
| axisXTitle | No | Set the x-axis title of chart. | |
| axisYTitle | No | Set the y-axis title of chart. | |
| data | Yes | Data for area chart, such as, [{ time: '2015', value: 23 }, { time: '2016', value: 32 }]. For multiple series: [{ group: 'Series A', time: '2015', value: 23 }, { group: 'Series B', time: '2015', value: 18 }]. | |
| height | No | Set the height of the chart, default is 600px. | |
| showArea | No | Whether to fill the area under the line. Default is false. | |
| showSymbol | No | Whether to show symbols on data points. Default is true. | |
| smooth | No | Whether to use a smooth curve. Default is false. | |
| stack | No | Whether stacking is enabled. When enabled, line charts require a 'group' field in the data. | |
| theme | No | Set the theme for the chart, optional, default is 'default'. | default |
| title | No | Set the title of the chart. | |
| width | No | Set the width of the chart, default is 800px. | |
| outputType | No | The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option. | png |