violin
Configuration Structure
violin: {}plotOptions
bandwidthScale
1Multiplies the density-derived half-width of each violin. At 1, a curve's own peak density maps to half the category slot. Values above 1 widen the curves, below 1 narrow them.
normalize
'individual'How violin widths are scaled across the series.
Available Options:
- 'individual' (default) — each violin is scaled to its own peak, so every curve fills the slot regardless of sample size.
- 'group' — all violins share one scale (the densest in the series), keeping widths proportional to density across categories.
points
Individual observations ("jitter") overlaid on the violin shape. The raw values come from the points array on each data point's y.
show
trueRender the jitter dots over each violin.
Available Options:
- true (default)
- false
shape
'circle'Marker shape for each observation.
Available Options:
- 'circle' (default)
- 'square'
size
2.5Marker radius in pixels.
jitter
0.5Horizontal scatter of the dots as a 0..1 fraction of the violin's half-width. 0 stacks every dot on the centre line.
constrainToViolin
trueClamp the jitter to the density width at each value so dots stay inside the curve outline.
Available Options:
- true (default)
- false
maxPoints
3000Cap on the number of dots drawn per violin. Observations beyond this are stride-thinned (evenly sampled) so dense groups stay performant.
opacity
0.9Opacity of the dots, from 0 to 1.
fillColor
'series-dark'Fill colour of the dots. Accepts 'series-dark' (a darker shade of the violin's own colour), 'series' (the violin's colour as-is), or any literal colour string such as '#fff'.
strokeColor
'#fff'Colour of the ring around each dot.
strokeWidth
1Width of the dot outline in pixels. 0 disables the outline.
colorScale
Colour each dot by its value along a ramp, overriding fillColor. Dots are bucketed into steps shades to keep rendering fast.
colors
undefinedHex colour stops, ordered low → high.
min
undefinedValue mapped to the first colour stop. Defaults to the data minimum.
max
undefinedValue mapped to the last colour stop. Defaults to the data maximum.
steps
24Number of shade buckets between min and max.