Dygraph - Live data update with vertical zoom

447 Views Asked by At

I have dygrpah live data update which updated data every seconds.

Once i will do the vertical zoom and data will gets refreshed after a second so vertical zoom gets reset again; and chart start updating data as usual.

can any one have idea how to maintain vertical zoom and update the data?

Thanks

1

There are 1 best solutions below

0
On

Use "valueRange" property.

In "zoomCallback" callback function, you will getting the yRanges. Assign the range to the "valueRange" property. You could something similar to this,

grpah.updateOptions({
    valueRange: [zoomMinY, zoomMaxY]
});