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

Panning is doing inverse when sort is set to descending #5413

Closed
mattijn opened this issue Sep 27, 2019 · 4 comments
Closed

Panning is doing inverse when sort is set to descending #5413

mattijn opened this issue Sep 27, 2019 · 4 comments
Labels
Area - Interaction Bug 🐛 P2 Important Issues that should be fixed soon
Milestone

Comments

@mattijn
Copy link
Contributor

mattijn commented Sep 27, 2019

Given the following minimal spec:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "data": {"url": "data/cars.json"},
  "mark": "tick",
  "encoding": {
    "x": {"field": "Horsepower", "type": "quantitative", "sort": "descending"}
  },
  "selection": {
    "zoompan": {"type": "interval", "bind": "scales", "encodings": ["x"]}
  }
}

And this animated gif:
reverse_panning gif

I was hoping that the panning remains in line with the mouse movement. But it is not. Now, because of the "sort": "descending", the panning-movement is the inverse of the panning.

@kanitw
Copy link
Member

kanitw commented Sep 27, 2019

Thanks. Also a related bug, using scale.reverse is similarly problematic:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "data": {"url": "data/cars.json"},
  "mark": "tick",
  "encoding": {
    "x": {"field": "Horsepower", "type": "quantitative", "scale": {"reverse": true}}
  },
  "selection": {
    "zoompan": {"type": "interval", "bind": "scales", "encodings": ["x"]}
  }
}

@zakjan
Copy link

zakjan commented Nov 5, 2019

I have this issue as well

@kanitw kanitw added the P2 Important Issues that should be fixed soon label Nov 5, 2019
@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

5 participants