Description
In lines and areas, the stroke, fill, fillOpacity, strokeOpacity, strokeWidth, title, and ariaLabel channels are reduced to the first element of the series in
Line 163 in 5ce6cc0
It would be interesting to be allowed to customize this reducer, in particular for title and ariaLabel, where we might want to display something like "10 data points with a mean of 3.3".
But this requires a structural change, because at present the scales are applied before the call to mark.render, and the grouping is done in render.
A solution could be to make any mark that needs grouping request that grouping (by z and by facet), by adding a "group: true" option for the mark, a grouper: true option for the grouping channel (z), and a grouped: true option on the channels which must be reduced (currently all defined in style.js). Then we could imagine that a line mark would be defined as
Plot.line(data, {x, y, z, ariaLabel: { value: "name", reduce: "mode" }})
or
Plot.line(data, {x, y, z, ariaLabel: { value: "name", reduce: series =>
some stats about the series
}})