4 <meta http-equiv=
"X-UA-Compatible" content=
"IE=EmulateIE7; IE=EmulateIE9">
7 <script type=
"text/javascript" src=
"../excanvas.js"></script>
10 For production (minified) code, use:
11 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
13 <script type=
"text/javascript" src=
"../dygraph-dev.js"></script>
17 <p>1: Simple line chart:
</p>
18 <div id=
"graphdiv1"></div>
19 <script type=
"text/javascript">
20 g1 = new Dygraph(document.getElementById(
"graphdiv1"),
21 "Date,Temperature\n" +
29 <p>2: Simple step chart:
</p>
30 <div id=
"graphdiv2"></div>
31 <script type=
"text/javascript">
32 g2 = new Dygraph(document.getElementById(
"graphdiv2"),
33 "Date,Temperature\n" +
44 <p>3: Filled step chart:
</p>
45 <div id=
"graphdiv3"></div>
46 <script type=
"text/javascript">
47 g3 = new Dygraph(document.getElementById(
"graphdiv3"),
48 "Date,Temperature\n" +
60 <p>4: Line chart with error bars:
</p>
61 <div id=
"graphdiv4"></div>
62 <script type=
"text/javascript">
63 g4 = new Dygraph(document.getElementById(
"graphdiv4"),
78 <p>5: Step chart with error bars:
</p>
79 <div id=
"graphdiv5"></div>
80 <script type=
"text/javascript">
81 g5 = new Dygraph(document.getElementById(
"graphdiv5"),
97 <p>6: Stepped chart with gaps from CSV:
</p>
98 <div id=
"graphdiv6"></div>
99 <script type=
"text/javascript">
101 document.getElementById(
"graphdiv6"),
102 "Date,GapSeries1,GapSeries2\n" +
103 "2009/12/01,10,10\n" +
104 "2009/12/02,15,11\n" +
108 "2009/12/06,18,15\n" +
109 "2009/12/07,12,16\n",
116 <p>7: Stepped chart with gaps from native data:
</p>
117 <div id=
"graphdiv7"></div>
118 <script type=
"text/javascript">
120 document.getElementById(
"graphdiv7"),
122 [ new Date(
"2009/12/01"),
10,
10],
123 [ new Date(
"2009/12/02"),
15,
11],
124 [ new Date(
"2009/12/03"), null,
12],
125 [ new Date(
"2009/12/04"), null,
13],
126 [ new Date(
"2009/12/05"),
15, null],
127 [ new Date(
"2009/12/06"),
18,
15],
128 [ new Date(
"2009/12/07"),
12,
16]
131 labels: [
"Date",
"GapSeries1",
"GapSeries2"],
134 GapSeries2: { axis: {} }
139 <p>8: Stacked filled step chart:
</p>
140 <div id=
"graphdiv8"></div>
141 <script type=
"text/javascript">
142 g8 = new Dygraph(document.getElementById(
"graphdiv8"),
144 "2008-05-07,70,30\n" +
145 "2008-05-08,12,88\n" +
146 "2008-05-09,88,12\n" +
147 "2008-05-10,63,37\n" +
148 "2008-05-11,35,65\n",
157 <p>9: Mixed mode - step and line:
</p>
158 <div id=
"graphdiv9"></div>
159 <script type=
"text/javascript">
160 g8 = new Dygraph(document.getElementById(
"graphdiv9"),
162 "2008-05-07,70,30\n" +
163 "2008-05-08,12,88\n" +
164 "2008-05-09,88,12\n" +
165 "2008-05-10,63,37\n" +
166 "2008-05-11,35,65\n",
169 Idle: {stepPlot: true},
170 Used: {stepPlot: false}
180 <p>10: Mixed mode - step and line (filled):
</p>
181 <div id=
"graphdiv10"></div>
182 <script type=
"text/javascript">
183 g8 = new Dygraph(document.getElementById(
"graphdiv10"),
185 "2008-05-07,70,30\n" +
186 "2008-05-08,12,88\n" +
187 "2008-05-09,88,12\n" +
188 "2008-05-10,63,37\n" +
189 "2008-05-11,35,65\n",
192 Idle: {stepPlot: false},
193 Used: {stepPlot: true}
202 <p>11: Mixed mode - step and line (stacked and filled):
</p>
203 <div id=
"graphdiv11"></div>
204 <script type=
"text/javascript">
205 g8 = new Dygraph(document.getElementById(
"graphdiv11"),
206 "Date,Idle,Used,NotUsed,Active\n" +
207 "2008-05-07,60,30,5,5\n" +
208 "2008-05-08,12,73,5,10\n" +
209 "2008-05-09,38,12,30,20\n" +
210 "2008-05-10,50,17,23,10\n" +
211 "2008-05-11,35,25,35,5\n",
214 Idle: {stepPlot: false},
215 Used: {stepPlot: true},
216 NotUsed: {stepPlot: false},
217 Active: {stepPlot: true}
225 <p>12: Mixed mode - step and line (errorbars):
</p>
226 <div id=
"graphdiv12"></div>
227 <script type=
"text/javascript">
228 g8 = new Dygraph(document.getElementById(
"graphdiv12"),
230 [
1, [
75,
2], [
50,
3]],
231 [
2, [
70,
5], [
90,
4]],
232 [
3, [
80,
7], [
112,
5]],
233 [
4, [
55,
3], [
100,
2]],
234 [
5, [
69,
4], [
85,
6]]
238 labels: [
"X",
"Data1",
"Data2"],
240 Data1: {stepPlot: true},
241 Data2: {stepPlot: false}
247 <p>13: Mixed mode - step and line (custombars):
</p>
248 <div id=
"graphdiv13"></div>
249 <script type=
"text/javascript">
250 g8 = new Dygraph(document.getElementById(
"graphdiv13"),
252 [
1, [
73,
75,
78], [
50,
55,
70]],
253 [
2, [
65,
70,
75], [
83,
91,
99]],
254 [
3, [
75,
85,
90], [
98,
107,
117]],
255 [
4, [
55,
58,
61], [
93,
102,
105]],
256 [
5, [
69,
73,
85], [
80,
85,
87]]
260 labels: [
"X",
"Data1",
"Data2"],
262 Data1: {stepPlot: true},
263 Data2: {stepPlot: false}