TEST: Added example of range selector without the chart.
authorDavid Eberlein <david.eberlein@ch.sauter-bc.com>
Fri, 12 Apr 2013 12:51:37 +0000 (14:51 +0200)
committerDavid Eberlein <david.eberlein@ch.sauter-bc.com>
Fri, 12 Apr 2013 12:51:37 +0000 (14:51 +0200)
tests/range-selector.html

index 3ad6a26..74a38d6 100644 (file)
       Roll period of 14 timesteps, custom range selector height and plot color.
     </p>
     <div id="roll14" style="width:800px; height:320px;"></div>
+    <p>
+      Demo of range selecor without the chart. (interesting if multiple charts should be synced with one range selector).
+    </p>
+    <div id="nochart" style="width:800px; height:30px;"></div>
     <script type="text/javascript">
       g1 = new Dygraph(
           document.getElementById("noroll"),
             rangeSelectorPlotFillColor: 'lightyellow'
           }
       );
+      g3 = new Dygraph(
+          document.getElementById("nochart"),
+          [[0,1],[10,1]],
+          {
+            xAxisHeight: 30,
+            drawXAxis: false,
+            showRangeSelector: true,
+            rangeSelectorHeight: 30,
+          }
+      );
     </script>
   </body>
 </html>