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

setting 'temporal' and 'bin' crashes editor #9499

Open
MarcBaeuerle opened this issue Dec 18, 2024 · 2 comments
Open

setting 'temporal' and 'bin' crashes editor #9499

MarcBaeuerle opened this issue Dec 18, 2024 · 2 comments
Labels

Comments

@MarcBaeuerle
Copy link

I tried using type: "temporal" and "bin": { "step": 1 } in the same config and my editor instantly crashed when loading.

Only use this spec in incognito

so it doesn't get stored locally. Otherwise, the vega editor will crash before you can change anything.

{
  "data": {"url": "data/seattle-weather.csv"},
  "mark": "bar",
  "encoding": {
    "x": {"timeUnit": "month", "field": "date", "type": "temporal", "bin":  {"replace_me": 1} },
    "y": {"aggregate": "mean", "field": "precipitation"}
  }
}

replace relace_me with step to reproduce

Image
@domoritz
Copy link
Member

I think bin takes precedence and then you can a bin for each 1 in a timestamp (which is very large). I'd say that's somewhat expected. I'm not sure what the right behavior in this case should be. Maybe ignore bin?

@hydrosquall
Copy link
Member

A few possible next steps come to mind, depending on where whether we believe Vega/vega-lite should warn users if they write a spec that will tax their browser. (As a side note, opening in non incognito mode is ok as long as you're in manual rather than auto mode).

  1. In editor, halt execution would take too long to render
  2. In Vega dataflow or scenegraph, throw an error if rendering this many bins would exceed the capabilities of the browser

I'm assuming we can't do something at the VL level since the compiler can't see the range of the input data. It's cool to see that binning by integer (ms) is possible, I previously thought you we could only bin by string-named timeUnits .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants