Y-Axis Range Control for Dygraph Time Series

619 Views Asked by At

I'm working on generating time series figures with Dygraphs and I would like to add improved vertical control for my figures. Specifically, I want to be able to zoom out incrementally rather than being forced to zoom out entirely or not at all.

I'm flexible about the solution. Making a vertical range selector would be great, but if there are simpler solutions like including text boxes that control the vertical range that would be great as well.

1

There are 1 best solutions below

0
On

You can set the y-axis range however you like using updateOptions:

g.updateOptions({valueRange: [min, max]});

See the link-interaction demo for a fully-worked example. It uses links to set the x-axis range (dateWindow), but it's the same idea.