question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Axis boundaries

See original GitHub issue

Hi, I just recently started using your plotting library (which is awesome by the way) to do some heatmap plots. One of the main complaints I’ve received have been the ability to pan outside the plot’s boundaries (just click and drag the plot outside the viewport and suddenly the axis range point to some non-data containing area). While this can be mitigated with the fixedrange attribute, you end up losing the pan and zoom features for that axis.

So, I was thinking that maybe adding axis boundaries could be a thing? Maybe two more properties could be added to the axes: bounds and boundsmode. bounds gets checked in the panning and zooming logic and, if set, it constrains the range to the specified bounds. boundsmode allows the bounds to be computed automatically from the plot (like autorange). That way users can zoom and pan al around the plot, but cannot get outside the plot bounds.

As proof of concept I have created this pull request g-i-o-/plotly.js#1 on my fork and was thinking maybe you guys could check it out comment on how to improve and, if you like it, add it or something like that.


  1. Here we have a nice little heatmap: newplot
  2. But then some user starts using with the panning tool a bit too much: newplot 1

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:14
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

15reactions
jasjescommented, Sep 24, 2018

PING! Would LOVE the ability to limit zoom-out and pan so the user can’t move beyond available data.

1reaction
MrQubocommented, Nov 4, 2019

I’ve made some work towards implementing this feature here: https://github.com/MrQubo/plotly.js/pull/3 Any help will be appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scatter plot feature requests - Product Suggestions
Here are some items I'd like to request for scatter plots: Change the x and y axis range by typing in the values....
Read more >
Feature Request: Ability to set the data range of an axis - jamovi
I know there are plans to include editable plots in the future. However, it's already possible to do some limited editing by exporting...
Read more >
FEATURE REQUEST: EA9 Line Trend Graph Dynamic Axis Range
A really messy workaround I have done is multiple line trends on top of each other with different ranges. The proper chart is...
Read more >
How do you adjust the y-axis scale in column reports?
Does anyone know how to set a specific value range for the y-axis in a ... still a feature request based on the...
Read more >
Controlling Axis Features - SAS Help Center
Sometimes you want a specialized axis type depending on the nature of the data. For example, if the data have a very large...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found