Home › forums › Report Bugs › Reset not working when chart is rendered already zoomed-in
This topic contains 3 replies, has 2 voices, and was last updated by Vishwas R 2 months, 3 weeks ago.
Note that pan still works as desired (from 10 to 90), but you can’t zoom-out to the whole range.
viewportMinimum and viewportMaximum are used to programmatically zoom to a region. In this scenario, if you try to reset the range by clicking reset button it will fallback to the range that you have set (viewportMinimum and viewportMaximum). Removing viewportMinimum and viewportMaximum should work fine in this case. Or if you are trying to zoom to a certain region on initial render and like to reset on clicking reset button, you can use rangeChanged event as shown in this updated JSFiddle.
Thanks a lot!
Isn’it a better solution to call e.chart.render() only when trigger === “reset”?
Yes, its better to call e.chart.render() only on triggering reset instead of calling it everytime the range is changed :)
You must be logged in to reply to this topic.