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

errorband_tooltip example is empty #6184

Closed
domoritz opened this issue Mar 27, 2020 · 2 comments · Fixed by #9320
Closed

errorband_tooltip example is empty #6184

domoritz opened this issue Mar 27, 2020 · 2 comments · Fixed by #9320
Labels
Bug 🐛 Help Wanted Good tasks for contributors (try https://github.com/vega/vega-lite/issues/1486 first) P2 Important Issues that should be fixed soon

Comments

@domoritz
Copy link
Member

https://vega.github.io/editor/#/examples/vega-lite/errorband_tooltip

image

@domoritz domoritz added Bug 🐛 P2 Important Issues that should be fixed soon Help Wanted Good tasks for contributors (try https://github.com/vega/vega-lite/issues/1486 first) labels Mar 27, 2020
@domoritz
Copy link
Member Author

domoritz commented Oct 5, 2020

Should be

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "url": "data/cars.json"
  },
  "mark": "errorband",
  "encoding": {
    "y": {"field": "Miles_per_Gallon", "type": "quantitative"},
    "x": {"timeUnit": "year", "field": "Year"},
    "tooltip": {"field": "Miles_per_Gallon", "aggregate": "mean"}
  }
}

But doesn't work right now. Probably a problem in the normalizer.

@domoritz
Copy link
Member Author

The spec in #6184 (comment) works now and we should push it.

However, the tooltip doesn't work correctly because we remove the mean_Miles_per_Gallon from the compiled Vega spec. It's probably being removed in some optimization (https://github.com/vega/vega-lite/blob/main/src/compile/data/optimize.ts) where we recognize that the aggregate is the same as for center_Miles_per_Gallon but we don't correctly rewrite the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Help Wanted Good tasks for contributors (try https://github.com/vega/vega-lite/issues/1486 first) P2 Important Issues that should be fixed soon
Projects
None yet
1 participant