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 node elements (e.g. 'rect.leaf', 'path.arc').
OptionalxAccessor for the node's own name, read against your datum.
OptionalyAccessor for the node's magnitude. Defaults to the value that
d3.hierarchy().sum(...) computed — which is what the rectangle's area
was drawn from — falling back to value or size on your datum.
OptionalpathAccessor for the node's ancestors, root first and excluding the node
itself. Defaults to the hierarchy node's own ancestor chain, so a layout
built with d3.hierarchy() needs nothing here.
Supply it for a tree drawn without d3.hierarchy(): [] (or an omitted
value) marks a top-level node.
Configuration for binding a D3 treemap or sunburst.
The canonical layout is
d3.treemap()/d3.partition()over ad3.hierarchy(), so the datum bound to each mark is a hierarchy node: the binder recognises it and reads the node's ownvalueplus its ancestor chain, exactly as the pie binder unwraps ad3.pie()arc. Both accessors are then read against YOUR datum (node.data), not against the node.Every matched element becomes one point, in DOM order — nothing is filtered. A treemap draws only its leaves and a sunburst draws its interior nodes too; whichever you select is what the reader navigates, and the counts have to match for highlighting to survive.
Example