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

Support for limiting min/max zoom/scale level #1312

Open
ljuborados opened this issue Mar 21, 2023 · 2 comments
Open

Support for limiting min/max zoom/scale level #1312

ljuborados opened this issue Mar 21, 2023 · 2 comments
Labels
enhancement Feature requests, and general improvements. good first issue Good issue for first-time contributors.

Comments

@ljuborados
Copy link

Is your feature request related to a problem? Please describe.

We have a somewhat basic requirement - limiting how much the chart can zoom,
e.g. this universally looks bad and we should never allow zooming into that much detail:

image

Describe the solution you'd like

Ideally a config option limiting max diff between from & to - either in logical representation or in time diff.
Less ideally, being able to return null or false from subscribeVisibleTimeRangeChange to prevent changing the visible time range.

Additional context

Tried calling setVisibleRange from inside subscribeVisibleTimeRangeChange but unfortunately UI 'jumps' to the scrolled to position first, and only after applies the range in setVisibleRange which comes with obvious UX issues.

Willing to lend a hand in a PR if this is something you guys would consider adding.

Thanks!

@SlicedSilver
Copy link
Contributor

Linking related issue: #1279

Would it be right to summarise your request as the ability to set the following options:

  • Minimum Bar Spacing
  • Maximum Bar Spacing

Bar spacing is the gap between the centre points of bars. It is essentially the 'zoom' level. So Essentially, options for max and min zoom.

Is there anything else?

@SlicedSilver SlicedSilver added enhancement Feature requests, and general improvements. good first issue Good issue for first-time contributors. labels Mar 21, 2023
@ljuborados
Copy link
Author

Absolutely would, that would handle the use-case.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, and general improvements. good first issue Good issue for first-time contributors.
Projects
None yet
Development

No branches or pull requests

2 participants