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

mark.invalid set the invalid points on y channel at the top #8254

Closed
yhoonkim opened this issue Jul 2, 2022 · 1 comment · Fixed by #9342
Closed

mark.invalid set the invalid points on y channel at the top #8254

yhoonkim opened this issue Jul 2, 2022 · 1 comment · Fixed by #9342

Comments

@yhoonkim
Copy link
Contributor

yhoonkim commented Jul 2, 2022

Here is the repro.

{
  "data": {
    "values": [
      {"color": "Blue", "y": 10},
      {"color": "Green", "y": null},
      {"color": "Red", "y": 20}
    ]
  },
  "encoding": {
    "x": {"field": "color", "type": "nominal", "title": "color"},
    "y": {"field": "y", "type": "quantitative"}
  },
  "mark": {"type": "line", "tooltip": true},
  "config": {"mark": {"invalid": null}}
}

image

It is supposed to place "Green" value at the bottom (the 0 value position (yScale(0)) not pure 0 position)

@kanitw
Copy link
Member

kanitw commented May 9, 2024

will be fixed in #9342!

kanitw added a commit that referenced this issue May 20, 2024
…valid data (e.g., nulls, NaNs) (#9342)

- Add more spec options for handling invalid data 
  - extend `mark.invalid`
  - add new `config.scale.invalid`

- See [docs's pdf file from
invalid.md](https://github.com/vega/vega-lite/files/15329038/Modes.for.Handling.Invalid.Data._.Vega-Lite.pdf)
or the actual doc for explanation of the behavior. (Given the complexity
of the PR, reviewers should check out the branch and test the spec
locally.)

refactor:
- Adjust how we generate rules for invalid data to handle these options,
per channel type.
    - data's invalid filter
    - `defined` encoding (for breaking paths)

- Make wrapCondition accept invalidValueRef for "include" mode.
- Remove the hidden/screen "hide" mode for invalid data (Given this is a
hidden feature, it's not a breaking change.)## PR Description

bug fixes:
- fix #8254  -- correctly place invalid point as zero, when included. 

Known issues / Follow up items: 
- Tooltip doesn't show null correctly
(#6417) -- I'll fix this
separately in a follow up PR
- Should Vega-lite always include color for invalid by default?
(#9351)


## Checklist

Tests:
- [x] Integration tests -- added a bunch of examples
- [x] Unit tests (in progress) -- I'll re-review the code and add more
unit tests.

Docs: 
- [x] Has documentation under `site/docs/` + examples.

---------

Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants