A bar chart is a statistical chart that uses horizontal rectangular bars to compare numerical values across different categories. Unlike column charts, bar chart bars are arranged from left to right rather than from bottom to top. A bar chart also requires a categorical variable and a numerical variable. In a bar chart, each entity of the categorical variable is represented as a horizontal rectangular bar, and the numerical value determines the length of the bar.
2024 Global Programming Language Popularity
Five Industries Quarterly Revenue Comparison, Custom Colors
Regional Product Line Sales, Custom Palette
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | required | Value must be "bar". |
| data | Object[] | required | Chart data. |
| data.category | string | number | required | Category name. |
| data.value | number | required | Category value. |
| data.group | string | optional | Group name. Required when grouping or stacking is enabled. |
| group | boolean | optional | Whether to enable grouping. |
| stack | boolean | optional | Whether to enable stacking. |
| 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. |