leeoniya / leeoniya/uPlot

Get data extents without resetting view

Open
#650 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
10.5k
Forks
463
PR merge metrics
No merged PRs in 30d

Description

I have some plugins to do pan and mousewheel scroll adapted heavily from your examples.
What I would like to do is get the calculated plot extents of all visible series as if the zoom were reset - including any ranging and spacing that uPlot builds in. However I would like to do this without resetting the view.

In other words I would like to get the scale ranges that autoscale calculates without actually changing the scales.

An example use case : the pan plugin clips against the initial view extents. However if I show a hidden series it might increase the used range of the y-axis. I would like the pan plugin to be able to detect the change so it can adjust its allowable panning area.

Is there a nice/easy way of doing this at the moment?

Sorry to bombard you with issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the pan plugin and the examples it was adapted from, then trace how autoscaling calculates ranges for visible series. The work is done when those calculated extents, including ranging and spacing, can be inspected without changing the current scales or view, and the pan plugin can use them after a hidden series is shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.