OptionalidUnique identifier for the chart. Used as the MAIDR id.
OptionaltitleChart title displayed in text descriptions.
OptionalsubtitleChart subtitle.
OptionalcaptionChart caption.
OptionalaxesAxis configuration. Each axis may be provided as either a plain string
(shorthand for { label: value }) or a full AxisConfig object
(for per-axis format, or grid navigation on scatter).
For heatmaps and segmented bar charts, use fill for the color/category
axis; the binder maps it to the canonical z axis in the MAIDR schema.
Optionalx?: D3AxisInputOptionaly?: D3AxisInputOptionalfill?: D3AxisInputFill/color axis for heatmaps and segmented bars. Maps to z internally.
OptionalformatOptional formatting configuration applied to axes that do not specify
their own format. Per-axis format on AxisConfig takes precedence.
OptionalautoWhen true (the default), the binder writes the generated MAIDR schema
to the SVG as a maidr-data attribute so vanilla-JS users don't need
to call svg.setAttribute(...) themselves. The returned result is
unchanged either way.
Set to false if you are driving MAIDR yourself — e.g. passing the
returned schema to <Maidr data={...}> or persisting it elsewhere.
The React adapter (useD3Adapter, MaidrD3) forces this
to false internally so it can stay in control of the schema.
CSS selector for the group curves (e.g. 'path.ridge'). One per group.
OptionalsamplesAccessor for the sample array, when the path's datum wraps it rather than
being it. Defaults to the datum itself when it is an array, the second
item of a d3.groups() tuple, or a values / samples / points /
curve property.
OptionalgroupAccessor for the group's name, resolved against the path's datum.
OptionalvalueAccessor for a sample's position along the value axis.
OptionaldensityAccessor for the curve's own half-width at a sample — the density before the group's baseline was added.
Configuration for binding a D3 ridgeline (joy) plot.
One
d3.area()density curve per group, the curves offset down the page so their shapes can be compared.selectormatches one<path>per group, and the samples come from that path's own bound array.densityis the curve's own half-width, never the drawn y. A ridgeline is drawn by adding the group's baseline to every density, and that baseline is layout rather than data: fed to MAIDR it would make every group's loudness a function of where it happened to be stacked, and the lowest ridge the loudest. So the binder reads the kernel-density value the chart computed before* offsetting it, and refuses to guess when the samples do not carry one.The fields are named for what they mean rather than for the payload keys they land on, because a ridgeline's value axis is usually the drawn
xwhile the payload'syis that same value:groupnames the ridge,valueis the position along the value axis,densityis the height there.