Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ordinal opacity #2285

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

ordinal opacity #2285

wants to merge 1 commit into from

Conversation

mbostock
Copy link
Member

Fixes #2284.

@mbostock mbostock requested a review from Fil February 20, 2025 19:59
@mbostock mbostock enabled auto-merge (squash) February 20, 2025 20:02
@mbostock
Copy link
Member Author

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 mbostock disabled auto-merge February 20, 2025 20:12
@Fil Fil mentioned this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ordinal opacity scales
1 participant