merging addition of range selector secondary gradient color (formerly PR 314) with...
[dygraphs.git] / tests / annotation-native.html
CommitLineData
41ee764f
DV
1<!DOCTYPE html>
2<html>
3 <head>
41ee764f 4 <title>Native format annotations</title>
41ee764f
DV
5 <script type="text/javascript" src="../dygraph-dev.js"></script>
6 </head>
7 <body>
8 <p>This test demonstrates how annotations can be used with <a href="http://dygraphs.com/data.html#array">native-format</a> data.</p>
9
10 <div id="demodiv"></div>
11
12 <script type="text/javascript">
13 g = new Dygraph(
14 document.getElementById("demodiv"),
15 [
16 [ new Date("2011/11/01"), 100 ],
17 [ new Date("2011/11/02"), 200 ],
18 [ new Date("2011/11/03"), 300 ],
19 [ new Date("2011/11/04"), 100 ],
20 [ new Date("2011/11/05"), 200 ],
21 [ new Date("2011/11/06"), 300 ],
22 [ new Date("2011/11/07"), 200 ],
23 [ new Date("2011/11/08"), 100 ]
24 ],
25 {
26 labels: [ 'Date', 'Value' ]
27 }
28 );
29
30 g.setAnnotations([{
31 series: 'Value',
32 x: Date.parse('2011/11/04'),
33 shortText: 'M',
34 text: 'Marker'
35 }]);
36 </script>
37</body>
38</html>