title: Dygraph multiple plots - turn them on and off
body: <p>I am considering the implementation of an HTML5 app based on dygraph that shows multiple plots like this app:
  <a href="http://www.triplespark.net/elec/pdev/cpld/ise-pfsim/ise-screen-sim-result.png" rel="nofollow noreferrer">http://www.triplespark.net/elec/pdev/cpld/ise-pfsim/ise-screen-sim-result.png</a></p>
  
  <p>I'd like to know the opinion of somebody who has some experience with multiple plot with dygraph regarding the implementation of it. As visible in the link above, plots should be stuck one on top of the other, plots should be removable (via check-boxes) and resizeable only horizontally (zoom in and out).</p>
  
  <p>I can basically see two ways:</p>
  
  <p>1) As suggested <a href="https://stackoverflow.com/questions/18088455/dygraphs-setvisibility-with-muiltiple-plots-on-page">here</a> draw one single large plot like this:</p>
  
  <p><a href="http://dygraphs.com/tests/color-visibility.html" rel="nofollow noreferrer">http://dygraphs.com/tests/color-visibility.html</a></p>
  
  <p>2) draw multiple plots (my favourite option) in different divs and keep them in synch like this:</p>
  
  <p><a href="http://dygraphs.com/tests/synchronize.html" rel="nofollow noreferrer">http://dygraphs.com/tests/synchronize.html</a></p>
  
  <p>Note that:</p>
  
  <p>1) I do not want to redraw all plots when one plot is added or eliminated.</p>
  
  <p>2) plots can be of many many points (>1M points)</p>
  
  <p>A second question I have is about the type of plot. I was wondering if anybody can see how to give me a hint about the implementation of the "foldable" plot of data_bus[0:7]</p>
  
  <p>Any suggestion would be great. I know that the question is generic, I plan to extend this question with a final example that will show the solution to this problem.</p>
  
  <p>Regards
  Fabrizio</p>