Binds a D3.js boxen (letter-value) plot to MAIDR, generating the accessible
data representation.
Point selector at one element per distribution — the <g> holding that
category's stack of nested rungs — the way bindD3Box points at a box
group. Every rung of a distribution highlights that group: a chart does not
draw an element per quantile that MAIDR could pair up positionally, and
inventing one would highlight geometry the chart never drew.
A D3BinderResult with the MAIDR data and generated layer.
Remarks
Timing — call after D3 has rendered. Like every D3 binder, this reads
each matched element's D3-bound __data__; calling it before
.data().join() has run (or before the SVG is mounted) throws "No elements
found for selector …" or "Property '…' not found on datum".
See
MaidrD3
useD3Adapter
Example
// One <g> per distribution, its datum carrying the ladder the rungs // were drawn from. constresult = bindD3Boxen(svgElement, { selector:'g.boxen', title:'Response Time by Group', axes: { x:'Group', y:'Milliseconds' }, x:'group', levels:'letterValues', });
Binds a D3.js boxen (letter-value) plot to MAIDR, generating the accessible data representation.
Point
selectorat one element per distribution — the<g>holding that category's stack of nested rungs — the way bindD3Box points at a box group. Every rung of a distribution highlights that group: a chart does not draw an element per quantile that MAIDR could pair up positionally, and inventing one would highlight geometry the chart never drew.