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 all bar segment elements (e.g., 'rect.bar', 'rect').
OptionalgroupCSS selector for series group elements (e.g., 'g.series').
When provided, bar segments are queried within each group and the
fill/series key is read from each group's D3 datum .key property
(standard d3.stack() output) unless overridden by the fill accessor.
OptionaltypeThe type of segmented chart.
OptionalxAccessor for the x-axis (category) value.
OptionalyAccessor for the y-axis (numeric) value.
OptionalfillAccessor for the fill/group identifier.
OptionaldomHint for how the rendered <rect> elements are ordered in the DOM.
'subject-major' — rects are interleaved by category then series,
e.g. [Cat0-A, Cat0-B, Cat0-C, Cat1-A, ...]. This is the result of a
single flat selectAll(...).data(flatArr).join(...) call and matches
the typical D3 dodged-bar pattern.'series-major' — all of series 0 first, then all of series 1, etc.,
e.g. [A-Cat0..CatN, B-Cat0..CatN, ...]. This is produced by looping
regions.forEach(r => selectAll(...).data(byRegion[r]).join(...)) and
matches the typical D3 stacked-bar pattern, as well as d3.stack()
with groupSelector.When omitted, the binder auto-detects from the rendered fills and falls
back to type-based defaults (stacked_bar / normalized_bar →
series-major, dodged_bar → subject-major).
Configuration for binding a D3 segmented bar chart (stacked, dodged, or normalized).
Supports two common D3 patterns:
Flat structure (no
groupSelector): All bar<rect>elements are queried from the SVG root, and each element's datum must includex,y, andfill.d3.stack()structure (withgroupSelector): Each series lives in a<g>group element whose datum has a.keyproperty identifying the series. Use function accessors to extract values from thed3.stack()tuple format.Example