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

Fix drag-zoom and pan for non-linear scales #488

Merged
merged 7 commits into from
May 2, 2021

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented May 2, 2021

Pan and drag-zoom were not working properly when the scale is of non-linear numeric type.

What is changed:

  • drag-zoom is based on getValueForPixel for all scales. I.e. the values at the rectangle corners are resolved and used as new boundaries
  • allow range to change when panning non-linear scale
  • Many new samples + some re-organization

Some issues left:

  • Pan on timeseries scale does not really work (chart.js issue)
  • Pan non-linear scale against a limit results to unwanted zooming

Resolves #180

@kurkle kurkle added the bug label May 2, 2021
@kurkle kurkle added the chore label May 2, 2021
@kurkle kurkle requested review from jledentu and etimberg May 2, 2021 13:38
@kurkle kurkle merged commit c2585ea into chartjs:master May 2, 2021
@kurkle kurkle deleted the non-linear branch July 1, 2021 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logarithmic x axis zoom bug
2 participants