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