Binds a D3.js word cloud to MAIDR, generating the accessible data
representation.
Point selector at the <text> elements — one per term. The default
accessors are d3-cloud's own datum keys (text and size), since the
plugin writes them onto every word it lays out; a cloud drawn from another
shape names its keys through x / y as usual.
The trace reads the terms heaviest first regardless of the order they are
emitted in, and matches the glyphs to them by the same permutation — so the
DOM order of the <text> elements (which for a cloud is packing order) does
not have to mean anything.
A D3BinderResult with the MAIDR data and generated layer.
Remarks
Timing — call after D3 has rendered. With d3-cloud that means inside
the layout's on('end', …) callback: the words are placed asynchronously,
so a binder called straight after .start() sees an empty SVG and throws
"No elements found for selector …".
Binds a D3.js word cloud to MAIDR, generating the accessible data representation.
Point
selectorat the<text>elements — one per term. The default accessors ared3-cloud's own datum keys (textandsize), since the plugin writes them onto every word it lays out; a cloud drawn from another shape names its keys throughx/yas usual.The trace reads the terms heaviest first regardless of the order they are emitted in, and matches the glyphs to them by the same permutation — so the DOM order of the
<text>elements (which for a cloud is packing order) does not have to mean anything.