Skip to content

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

Merged
kurkle merged 7 commits intochartjs:masterfrom
kurkle:non-linear
May 2, 2021
Merged

Fix drag-zoom and pan for non-linear scales#488
kurkle merged 7 commits intochartjs:masterfrom
kurkle:non-linear

Conversation

@kurkle
Copy link
Copy Markdown
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 etimberg and jledentu 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