Make dblclick event cancelable. (#840)
[dygraphs.git] / gallery / dygraph-simple.js
CommitLineData
e88a95b4 1/*global Gallery,Dygraph,data */
c1f22b5a
RK
2Gallery.register(
3 'dygraph-simple',
4 {
5 name: 'Minimal Example',
6 setup: function(parent) {
7 parent.innerHTML = "<p>Minimal example of a dygraph chart:</p><div id='graphdiv'></div>" +
8 "<p>Same data, specified in a parsed format:</p><div id='graphdiv2'></div>";
9 },
10 run: function() {
e88a95b4 11 new Dygraph(document.getElementById("graphdiv"),
c1f22b5a
RK
12 "Date,Temperature\n" +
13 "2008-05-07,75\n" +
14 "2008-05-08,70\n" +
15 "2008-05-09,80\n");
e88a95b4 16 new Dygraph(document.getElementById("graphdiv2"),
c1f22b5a
RK
17 [ [ new Date("2008/05/07"), 75],
18 [ new Date("2008/05/08"), 70],
19 [ new Date("2008/05/09"), 80]
20 ],
21 {
22 labels: [ "Date", "Temperature" ]
23 });
24 }
25 });