Violin Chart

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.

Use Cases

  • Used to display the distribution and density of one or more groups of data, such as score distributions, experimental results, financial data, etc.
  • Suitable for highlighting data distribution shapes, central tendencies, and outliers

Visual Examples

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

Options

Configuration Options

PropertyTypeRequiredDescription
typestringrequiredValue must be "violin".
dataObject[]requiredChart data.
data.categorystringrequiredCategory name.
data.valuenumberrequiredCategory value.
data.groupstringoptionalGroup name, used for multi-group data comparison.
titlestringoptionalChart title.
axisXTitlestringoptionalX-axis title.
axisYTitlestringoptionalY-axis title.
theme'default' | 'dark' | 'academy'optionalChart theme, default is "default".
styleObjectoptionalChart style.
style.palettestring[]optionalMust be an array of valid color values.
style.backgroundColorstringoptionalMust be a valid color value.
style.startAtZerobooleanoptionalWhether the Y-axis starts from zero, default is false.
axisXTitlestringoptionalX-axis title.
axisYTitlestringoptionalY-axis title.