A line chart is a statistical chart composed of points and lines in a Cartesian coordinate system, commonly used to represent changes in values over continuous time intervals or ordered categories. In a line chart, the x-axis is typically used for continuous time intervals or ordered categories, while the y-axis is used for quantitative data — negative values are plotted below the x-axis. Lines connect adjacent data points. Line charts are used to analyze trends of things changing over time or ordered categories. Data-wise, a line chart requires a continuous time field or a categorical field and at least one continuous data field.
Global Average Temperature Anomaly
Monthly Average Temperature Comparison of Four Cities, Custom Colors
Global Renewable Energy Installed Capacity Trend, Custom Palette
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | required | Value must be "line". |
| data | Object[] | required | Chart data. |
| data.time | string | number | required | Time series name. |
| data.value | number | required | Data value. |
| data.group | string | optional | Group name. |
| title | string | optional | Chart title. |
| axisXTitle | string | optional | X-axis title. |
| axisYTitle | string | optional | Y-axis title. |
| theme | 'default' | 'dark' | 'academy' | optional | Chart theme, default is "default". |
| style | Object | optional | Chart style. |
| style.backgroundColor | string | optional | Must be a valid color value. |
| style.palette | string[] | optional | Must be an array of valid color values. |
| style.lineWidth | number | optional | Value must be greater than 0. |