generate_line_chart
Create line charts to visualize trends over time using customizable axes, themes, and options. Supports multiple series, stacking, and exporting to png or svg formats.
Instructions
Generate a line chart to show trends over time, such as, the ratio of Apple computer sales to Apple's profits changed from 2000 to 2016.
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 line 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. |