Binds a D3.js error-bar chart to MAIDR, generating the accessible data
representation.
Point selector at one element per estimate — the canonical D3 idiom is a
<g> holding the interval's <line> and the estimate's marker, and that
group is what the reader's cursor should highlight.
The bounds are absolute positions on the value axis, not half-widths.
Producers disagree about which they hand out, so the grammar fixes one and
each adapter converts. The binder cannot tell an offset from a bound by
looking at it, so a datum carrying ±se needs a function accessor:
yMin: d => d.mean - 1.96 * d.se.
Parameters
svg: Element
The SVG element containing the D3 error-bar chart.
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".
Binds a D3.js error-bar chart to MAIDR, generating the accessible data representation.
Point
selectorat one element per estimate — the canonical D3 idiom is a<g>holding the interval's<line>and the estimate's marker, and that group is what the reader's cursor should highlight.The bounds are absolute positions on the value axis, not half-widths. Producers disagree about which they hand out, so the grammar fixes one and each adapter converts. The binder cannot tell an offset from a bound by looking at it, so a datum carrying
±seneeds a function accessor:yMin: d => d.mean - 1.96 * d.se.