Scoped to that trace's own group rather than to the panel, because a panel
can draw more than one trace into its barlayer and the panel-wide
selector named all of their bars at once. Measured: two bars in overlay
mode, a bar beside a histogram, or two histograms each give a layer a
selector matching every group's bars (#993).
What that cost differed by layer. A plain one saw more elements than points
and withdrew its highlight — no outline at all. A segmented one does not
compare counts, it chunks, so the extra elements shifted every cell instead:
with a histogram's group drawn first, series A at 'charlie' announced its
own value while outlining the histogram's first bin.
The same holds one layer over: two funnels or two waterfalls on a panel
each get two groups in their own layer, and the layer-wide selector named
both — measured, 6 elements for two three-point traces.
Parameters
prefix: string
The subplot prefix the trace is drawn in
layer: string
The layer plotly drew it into, e.g. 'barlayer'
tracePosition: number
Its position among that layer's traces on the panel
Returns string
The selector for that trace's bars, in its own point order
Every bar plotly drew for one bar-family trace.
Scoped to that trace's own group rather than to the panel, because a panel can draw more than one trace into its
barlayerand the panel-wide selector named all of their bars at once. Measured: two bars inoverlaymode, a bar beside a histogram, or two histograms each give a layer a selector matching every group's bars (#993).What that cost differed by layer. A plain one saw more elements than points and withdrew its highlight — no outline at all. A segmented one does not compare counts, it chunks, so the extra elements shifted every cell instead: with a histogram's group drawn first, series A at 'charlie' announced its own value while outlining the histogram's first bin.
The same holds one layer over: two funnels or two waterfalls on a panel each get two groups in their own layer, and the layer-wide selector named both — measured, 6 elements for two three-point traces.