Home › forums › StockChart Support › re-render, viewport, zooming
Tagged: render, viewport, zoom
Hello! I’m using candlestick chart with fetching dataPoints from Binance API and updating last datapoint with WebSocket via render() on every socket message.
The problem is when i trying to zooming or panning (change viewport), socket re-render chart and setting viewport to default values, which was rendered at first time.
Is there way not to reset viewport, when the render() method calls
Or is there way to update chart without render()?
Can you kindly create JSFiddle and share it with us (or a sample project and share it with us over Google-Drive or OneDrive) along with further briefing about the issue you are facing so that we can look into code / chart-options being used, understand the scenario better and help you out?
I have emulated my problem in this JSFiddle
There you can try to zoom, but after updating chart (re-render), viewport sets to default
Thanks for reporting the use-case. The issue seems to be happening when navigator is disabled. We will fix this issue in our future versions. However, you can achieve your requirement using Chart instead of StockChart (using canvasjs.stock.min.js, you can create both Chart and StockChart) as shown in this JSFiddle.
You must be logged in to reply to this topic.