4 <title>Custom grid and Dot
</title>
6 For production (minified) code, use:
7 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
9 <script type=
"text/javascript" src=
"../dygraph-dev.js"></script>
11 <script type=
"text/javascript" src=
"data.js"></script>
15 <p>Dot and lines should be extra large. Grid is red.
</p>
16 <div id=
"div_g14" style=
"width:600px; height:300px;"></div>
18 <script type=
"text/javascript">
20 document.getElementById(
"div_g14"),
24 gridLineColor: '#FF0000',
25 highlightCircleSize:
10,
31 <p>Use axis specific grid options. (independentTicks, gridLinePattern, ...)
</p>
32 <div id=
"div_g15" style=
"width:600px; height:300px;"></div>
34 <script type=
"text/javascript">
36 for (var i =
1; i <=
100; i++) {
38 if (d
> 31) { m =
"02"; d -=
31; }
39 if (m ==
"02" && d
> 28) { m =
"03"; d -=
28; }
40 if (m ==
"03" && d
> 31) { m =
"04"; d -=
31; }
41 if (d <
10) d =
"0" + d;
42 // two series, one with range
1-
100, one with range
1-
2M
43 data.push([new Date(
"2010/" + m +
"/" + d),
46 1e6 * (
1 + i * (
100 - i) / (
50 *
50)),
47 1e6 * (
2 - i * (
100 - i) / (
50 *
50))]);
50 document.getElementById(
"div_g15"),
53 labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
66 independentTicks: true
71 independentTicks: true
74 // set axis-related properties here
76 ticker: Dygraph.numericLinearTicks,
78 independentTicks: true,
79 gridLineColor:
"#ff0000",
80 gridLinePattern: [
4,
4]