Home Forums StockChart Support zoom reset not working after call to render

zoom reset not working after call to render

Viewing 5 posts - 1 through 5 (of 5 total)
  • #37631

    The zoom reset button stops working as soon as data is changed dynamically and stockChart.render() is called.

    Please fix.

    JSFiddle:
    https://jsfiddle.net/jcmalek/rqe8nt93/21/

    #37671

    @scroteau,

    Clicking the reset button of an individual chart will reset the axis range to its previous state just before rendering the stockchart. In your case, you are calling stockchart.render() within rangeChanged event. Once the reset button is clicked, it gets the axis range values from viewportMinimum & viewportMaximum just before calling render, i.e. updated values from the slider.


    Adithya Menon
    Team CanvasJS

    #37799

    So if I understand correctly, the zoom reset button only goes back to the last call to stockchart.render().

    This would seem to work against the ability to do live updates as suggested by your example:
    https://canvasjs.com/docs/charts/how-to/live-updating-javascript-charts-json-api-ajax/

    The moment a live update comes in, the end user looses the ability to reset their zoom to anything before the last update (due to the stockchart.render() call).

    Consequently, I would like to make a feature request that the zoom reset button’s history extend beyond the last call to stockchart.render() so that resetting the zoom actually works with live updates.

    #37816

    @scroteau,

    Thank you for your suggestion. We will revisit this behavior in future releases.


    Adithya Menon
    Team CanvasJS

    #41356

    Thank you. I have finally had the chance to apply the workaround your team suggested for this issue and it appears to be working.

    It would however still be nice if this could be fixed at some point so we can remove our workarounds. Thank you for considering this for a future release.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.