-
Notifications
You must be signed in to change notification settings - Fork 185
Can't set unknown domain in colour scale #446
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
Comments
Anything outside the domain will not be plotted; we need the “other” transform for this use case. |
I ran into something that seems similar related to NAs when plotting height / weight the Olympics dataset. Example here. |
Another use-case (very similar to Zan's) can be found in https://observablehq.com/@rcatlord/spine-charts; for some of the areas (try "Rother" in the select), the value comes in as "NA" instead of a number, and the x axis switches to a categorical scale. |
With this feature:
|
I'm using the color scale with explicit domain/range to associate status names with colours:
But status names I forgot to list come out invisible. A way of setting the
unknown()
value would be useful, it looks like it is hardcoded toundefined
atplot/src/scales/ordinal.js
Line 206 in 068f8d8
The text was updated successfully, but these errors were encountered: