grouped reduce in area and line marks#732
Conversation
|
This is still materializing a mapped channel even though we only need a single value. And as you noted it doesn’t use the existing reducers. I’ll try to take a crack at this soon, but I want something that does both of these things before merging. |
|
yes a bit more work is needed. I wanted to rebase and clean up the previous PR so we could make progress on this. To sum up the current status: this is suboptimal because it populates a channel with n copies of the reduced value. But I've been struggling with the fact that we can't reduce to a single value either: we need a channel, because we have to carry an element for each line or area. The difficulty is that the reduction must to happen in a grouped transform (z + facet, like map does), in a manner that is compatible with Plot.window, before we apply scales, and before we group. Addendum: and the way the data is grouped is not necessarily happening in the same order in Plot.map and in Plot.line's render function. |
|
👍 looking forward to this update |
|
Should we close this, since we landed #761? |
|
Yes. I still think there is value in the Plot.reduce helper described in #724 (comment). |
closes #724 (and #503)
todo:
supersedes #508