You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered two odd behaviors when a scatter plot with an axis set to rangemode: 'tozero' has only negative data points. If there is only a single data point, the axis direction will be reversed and the inital range won't go all the way to the point (it looks like it's 1 unit away from the point; you can scroll to find the point at the correct coordinates). If there are multiple data points, the axis direction will be correct and both points will be within the initial range, but the initial range won't go to zero. I've included examples of these as the first and second graphs in the Codepen. I've also included examples of bar charts as the third and fourth graphs to show what I think is the correct behavior.
If this is indeed a bug I'm happy to work on a patch to fix it.
The text was updated successfully, but these errors were encountered:
The autorange code is pretty old and not that well tested so I'm not sure what exactly rangemode: 'tozero'should do for scatter traces with negative values.
Generalising non-default rangemode to negative values would be great addition to the library. But we should first solidify our testing suites.
Here are the (only) two image test we have for non-default rangemode at the moment:
The autorange computations are made in Axes.getAutoRange and rely on Axes.expand which is called from the trace modules (e.g. here for bar traces). Both these routine aren't tested in isolation yet (in axes_test.js). We should do this before moving on this fixing the issue you're pointed here.
Uh oh!
There was an error while loading. Please reload this page.
Repro cases: http://codepen.io/anon/pen/QEBOzQ
I've encountered two odd behaviors when a scatter plot with an axis set to
rangemode: 'tozero'
has only negative data points. If there is only a single data point, the axis direction will be reversed and the inital range won't go all the way to the point (it looks like it's 1 unit away from the point; you can scroll to find the point at the correct coordinates). If there are multiple data points, the axis direction will be correct and both points will be within the initial range, but the initial range won't go to zero. I've included examples of these as the first and second graphs in the Codepen. I've also included examples of bar charts as the third and fourth graphs to show what I think is the correct behavior.If this is indeed a bug I'm happy to work on a patch to fix it.
The text was updated successfully, but these errors were encountered: