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
yAxis zoom in Highstock #979
Comments
The is issue is fully described in thread - http://highslide.com/forum/viewtopic.php?f=9&t=11345&p=73175 The fix is also discussed there. Appears that option for ResetZoom button is hardcoded in the library. |
FWIW I'm running the very latest Highstock release (pulled from GH this morning), and it appears that this bug does indeed still exist. Setting resetZoomEnabled to true while setting zoomType to 'y' (or 'xy' for that matter) does not result in the reset zoom button being displayed on the chart. I can zoom in just fine, but cannot zoom out. |
Is there a way to vote for this issue? |
Just removing the chart.resetZoomEnabled fixes the case for Y axis zooming, but for X axis zooming the zoom button now results in the axis being zoomed out to "All" view. Also, you can continue to navigate the X axis and the zoom button still shows. This is probably not what you want in a stock chart. How would you expect the Reset zoom button to work? Should we just enable it for Y axis and ignore everything that has to do with the X axis as long as there is a navigator attached to it? |
I think Reset zoom button should be displayed only if chart had zoomed by Y axis.
Removing this from Scroller class and RangeSelector class constructors do exactly what i want. |
No, we need to do more than just remove resetZoomEnabled, since we need to separate the behaviour of X and Y axis. I'll have a look at it. |
…n the Y axis in stock charts. Issue #979.
All right, I refactored this logic so that only the X axis is ignored when it comes to the reset zoom button whenever there is a navigator attached to the X axis. See http://jsfiddle.net/highcharts/GyurF/9/. This is what it behaves like now:
Please review the demo and report back. If you agree this is a useful fix, I'll close the issue. |
For me it's not quite natural. Typical use case for this mode (zoomType = 'xy') - selecting chart area (rectangle) which you want to zoom. It would be more natural for user, if reset zoom button in this mode will reset zoom (zoom out) both for X and Y axises (just like it was, when delete |
I agree with last comment |
But that wasn't what it did when we just deleted chart.resetZoomEnabled. What it did was that the X axis zoomed all the way out, equivalent to clicking the "All" button in the range selector. And I think that was more confusing than anything. So I propose two options:
|
I agree.
My vote for this solution. |
+1 by the way sometimes we don`t need to have range selector and navigator. |
Yes, this discussion only applies to when the navigator is enabled. Anyway, we'll try out the option with X axis going back to previous zoom |
Okay, please try now. I pulled the whole thing out of the Chart prototype |
It's just works! |
Thanks and you're welcome! |
A new problem case here: http://jsfiddle.net/highcharts/npGey/ Instead of checking for scrollbar and navigator, we should check for range selector and navigator. The scrollbar alone doesn't provide a way to zoom back out, like the range selector and navigator do. |
… the navigator and rangeSelector were hidden, and the scrollbar was visible. Related to #979.
Still having this issue in highstock. Currently using: zoomType: 'x' reset zoom button is disabled. What I would like:
This is different than using rangeSelector (inconvenient typing to get specific) or clicking a button which are fixed to whatever intervals are defined (1m, 3m, 6m etc.) Ideally, reset zoom would keep track of a stack of extremes and clicking it twice would pop back until chart reaches the "All" zoom. Then as a user I can quickly zoom in and out of different sections. |
Workaround: To show/hide button under any circumstances, we can modify options in a simple wrapper, demo: http://jsfiddle.net/BlackLabel/npGey/25/ Snippet: (function(H) {
H.wrap(H.Axis.prototype, 'zoom', function(proceed, newMin, newMax) {
var ret;
// This will always cause the button to show up after zooming in:
this.chart.options.rangeSelector.enabled = false;
this.chart.options.navigator.enabled = false;
ret = proceed.call(this, newMin, newMax);
// Restore default options
this.chart.options.rangeSelector.enabled = true;
this.chart.options.navigator.enabled = false;
return ret;
});
})(Highcharts); @kevin-coelho - regarding history of zooming events, I agree that would be cool feature. Maybe instead of double click I would prefer two small buttons (e.g. |
The button doesn't show up for me either with navigator enabled and zoomType: 'xy'. As far as i can see in the fiddle posted by @TorsteinHonsi this is how the library behaves - if either rangeSelector or navigator is enabled, then the reset zoom button doesn't appear. Is there some proper way to zoom out on the y-axes on a StockChart with scrollbars and navigator enabled? |
Hi @SirZdanius, Demo: Please test and let me know if all worked properly or you have any suggestions. |
Hi @sebastianbochan , Judging by the demo, the issue is indeed fixed! Any idea when we can expect this version on npm? |
Hi @SamHoulder, |
Hi @sebastianbochan , |
Hi @EloHailwidis, |
Is possible to zoom in, but not to zoom out - ResetZoom button doesn't show up. Example from docs: http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/stock/chart/zoomtype-y/
Workaround is to create separate button for that: http://jsfiddle.net/Fusher/GyurF/
The text was updated successfully, but these errors were encountered: