plot
plot copied to clipboard
select top *k* values?
A data transform to select the top k values in each series (facet+z)
Plot.selectTop({k: 5, value: "revenue", ...options})
Not sure how this will fit into our existing Plot.select syntax. Currently you do something like this:
Plot.select({x: "max"}, options)
We could let you pass the k as another option, if we assume you’ll never want to select a channel k:
Plot.select({x: "top", k: 5}, options)
We could do like what we did for percentile reducers?
Plot.select({x: "top5"}, options)
We could require you to pass in a selector implementation?
Plot.select({x: Plot.top(5)}, options)
We could allow an object?
Plot.select({x: {top: 5}}, options)
Hmm.