A violin chart is a statistical chart used to display data distribution and probability density. It uses symmetric density curves to show the distribution shape of data, and can combine boxplot elements to display median and quartiles. It is suitable for intuitively comparing the distribution and density characteristics of different groups of data.
Iris Sepal Length Distribution (Grouped by Species)
Temperature Distribution of Four Cities: Beijing, Shanghai, Guangzhou, Harbin (30 samples each), Custom Colors
Crop Yield Distribution: Rice, Wheat, Corn (25 samples each), Custom Palette
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | required | Value must be "violin". |
| data | Object[] | required | Chart data. |
| data.category | string | required | Category name. |
| data.value | number | required | Category value. |
| data.group | string | optional | Group name, used for multi-group data comparison. |
| 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.palette | string[] | optional | Must be an array of valid color values. |
| style.backgroundColor | string | optional | Must be a valid color value. |
| style.startAtZero | boolean | optional | Whether the Y-axis starts from zero, default is false. |
| axisXTitle | string | optional | X-axis title. |
| axisYTitle | string | optional | Y-axis title. |