A funnel is a bar chart whose order is meaningful: the trace pitches the
retention between adjacent stages rather than the raw counts, because the
drop-off is what the chart is drawn for. Stage order therefore comes
straight from the DOM — the binder keeps the elements in the order D3 joined
them, so draw the stages top-to-bottom (or left-to-right) in funnel order.
selector matches one element per stage, whichever mark you drew it with:
a trapezoid <path>, a centred <rect>, or a <g> per stage.
Parameters
svg: Element
The SVG element (or container) containing the D3 funnel chart.
Binds a D3.js funnel chart to MAIDR.
A funnel is a bar chart whose order is meaningful: the trace pitches the retention between adjacent stages rather than the raw counts, because the drop-off is what the chart is drawn for. Stage order therefore comes straight from the DOM — the binder keeps the elements in the order D3 joined them, so draw the stages top-to-bottom (or left-to-right) in funnel order.
selectormatches one element per stage, whichever mark you drew it with: a trapezoid<path>, a centred<rect>, or a<g>per stage.