0

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.

1 Answers1

0

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]
});
danvk
  • 15,863
  • 5
  • 72
  • 116
  • Thank you! It works! It is now all over our web page. I have posted another question on Dygraphs a while ago... It is about normalizing the data to the oldest date visible. That would be an extremely cool feature. Can you check it out? Thanks! – TradingDerivatives.eu Dec 05 '15 at 12:05