fix: make default vega format null as "null"#3926
Merged
Conversation
kanitw
commented
May 20, 2024
| const wrap = method => function(value, spec) { | ||
| const locale = this.context.dataflow.locale(); | ||
| return locale[method](spec)(value); | ||
| return value === null ? 'null' : locale[method](spec)(value); |
Member
Author
There was a problem hiding this comment.
This seems a little bit hacky, but is also the most minimal amount of code to make this work.
domoritz
approved these changes
May 23, 2024
Member
There was a problem hiding this comment.
don't include this in the pull request. This will be done on release. Same for other files here.
Co-authored-by: Dominik Moritz <domoritz@gmail.com>
Co-authored-by: Dominik Moritz <domoritz@gmail.com>
Co-authored-by: Dominik Moritz <domoritz@gmail.com>
Merged
lsh
pushed a commit
that referenced
this pull request
Jun 14, 2024
Changes since v5.29.0 **vega-functions** - make default vega format null as "null" (via #3926). (Thanks @kanitw & @domoritz )! **docs** - Add 4 new examples (via #3851). (Thanks @avatorl & @domoritz!) **monorepo** - Deploy editor preview (via #3925, #3931). (Thanks @hydrosquall!) - Bump all `vega-*` deps in topological order to eliminate version mismatches within the monorepo (via #3932). (Thanks @lsh!) Signed-off-by: Lukas Hermann <lukas.hermann@databricks.com>
michaelherger
pushed a commit
to LMS-Community/lms-community.github.io
that referenced
this pull request
May 30, 2025
…e in the map (caused by vega/vega#3926?)
|
I have an issue with this change where a world map now would add a shade to countries with no data. As previously no data was interpreted as 0, I got no shade. But now with "null" they'd be shaded. How would I tell Vega to interpret missing data as zero now? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make default vega format null as "null".
Context: I was trying to fix this in Vega-Lite, but then realize that it seems instead of add conditional expression everywhere in Vega-Lite. Better fix at the Vega level.
null.Number Format
Before (spec):
After:
Time Format
Before (spec):
After: