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

Scale binding flips inverted domains #5386

Closed
jakevdp opened this issue Sep 16, 2019 · 3 comments
Closed

Scale binding flips inverted domains #5386

jakevdp opened this issue Sep 16, 2019 · 3 comments
Assignees
Labels
Area - Interaction Bug 🐛 P2 Important Issues that should be fixed soon

Comments

@jakevdp
Copy link
Contributor

jakevdp commented Sep 16, 2019

If you bind a selection to scales on an inverted domain, the domain flips on first interaction. Here is an example (vega editor):

{
  "data": {"url": "data/cars.json"},
  "mark": "point",
  "encoding": {
    "x": {
      "type": "quantitative",
      "field": "Horsepower",
      "scale": {"domain": [250, 0]}
    },
    "y": {"type": "quantitative", "field": "Miles_per_Gallon"}
  },
  "selection": {
    "pan": {"type": "interval", "bind": "scales"}
  }
}

First reported in vega/altair#1693

@arvind
Copy link
Member

arvind commented Jan 6, 2021

Closing in favor of #5413 which has a few more specs that exhibit similar/related issues.

@arvind
Copy link
Member

arvind commented Jan 7, 2021

Actually, this issue occurs due to a different cause than the specs in #5413. In particular, selection-driven scale domains are read off the top-level/resolved selection signal which automatically sorts values in ascending order as part of the unioning/intersection strategy.

@arvind
Copy link
Member

arvind commented Jan 7, 2021

Fixed with #7163.

@arvind arvind closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Interaction Bug 🐛 P2 Important Issues that should be fixed soon
Projects
None yet
Development

No branches or pull requests

3 participants