Violin Plot Recipe

Three violin shapes comparing car acceleration distributions by origin
Category-centered kernel-density profiles with shared width resolution.

Minimal flow

Runnable: install ggaction and provide the named data array as plain row objects.

import { chart } from "ggaction";

const program = chart()
  .createCanvas()
  .createData({ values })
  .createViolinPlot({
    x: "category",
    y: "value"
  });

You must decide

The library infers

Add color: "category" for category fills. Use split: { field } when the field has exactly two values, or provide an explicit two-value domain when side assignment must be stable independently of source order.

Continue

Violin-plot API · Density encoding · Scale options