plot icon indicating copy to clipboard operation
plot copied to clipboard

ordinal opacity

Open mbostock opened this issue 1 year ago • 1 comments

Fixes #2284.

mbostock avatar Feb 20 '25 19:02 mbostock

Hmm, this still crashes if you try to have a threshold opacity scale, which is a separate but related bug:

Plot.cellX(d3.range(10), {fill: "red", opacity: Plot.identity}).plot({opacity: {type: "threshold", legend: true, domain: [1, 2, 3], range: [0.2, 0.4, 0.6, 0.8]}})

But also it crashes if you try to display an ordinal opacity scale with a ramp legend, which should be supported (because we can display ordinal color scales with a ramp legend, too):

Plot.cellX(d3.range(10), {fill: "red", opacity: Plot.identity}).plot({opacity: {type: "ordinal", legend: "ramp"}})

mbostock avatar Feb 20 '25 20:02 mbostock