pm86
pm86

Reputation: 230

Dygraph - Live data update with vertical zoom

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

Upvotes: 1

Views: 473

Answers (1)

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]
});

Upvotes: 1

Related Questions