TradingDerivatives.eu
TradingDerivatives.eu

Reputation: 408

Dygraphs equivalent for GViz setVisibleChartRange?

On our website http://tradingderivatives.eu/DAX-root.html, you can select a part of the tables and the graph will respond by zooming; the table event handers call the setVisibleChartRange method of the graph. Is there something similar for the graphs by Dygraphs?

I tried,among others, to google for "setVisibleChartRange Dygraphs" but nothing useful appears.

Upvotes: 0

Views: 117

Answers (1)

danvk
danvk

Reputation: 16955

You do this by calling updateOptions. If you want to set the y-axis range, set valueRange. If you want to set the x-axis range, use dateWindow:

g.updateOptions({
  dateWindow: [minDateInMillis, maxDateInMillis],
  valueRange: [yAxisMin, yAxisMax]
});

Upvotes: 0

Related Questions