4 <meta http-equiv=
"X-UA-Compatible" content=
"IE=EmulateIE7; IE=EmulateIE9">
5 <title>Custom Circles
</title>
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 <h2>Custom circles and hover circles
</h2>
18 <div id=
"demodiv"></div>
20 <script type=
"text/javascript">
21 var smile = function(g, series, ctx, cx, cy, color, radius) {
22 mouthlessFace(g, series, ctx, cx, cy, color, radius);
24 ctx.fillStyle =
"#000000";
26 ctx.arc(cx, cy, radius -
2,
.3, Math.PI -
.3, false);
30 var frown = function(g, series, ctx, cx, cy, color, radius) {
31 mouthlessFace(g, series, ctx, cx, cy, color, radius);
33 ctx.fillStyle =
"#000000";
35 ctx.arc(cx, cy + radius, radius -
2, Math.PI +
.3, -
.3, false);
39 var mouthlessFace = function(g, series, ctx, cx, cy, color, radius) {
40 ctx.strokeStyle =
"#000000";
41 ctx.fillStyle =
"#FFFF00";
43 ctx.arc(cx, cy, radius, Math.PI *
2, false);
48 ctx.fillStyle =
"#000000";
50 ctx.arc(cx - (radius /
3) , cy - (radius /
4),
1, Math.PI *
2, false);
56 ctx.arc(cx + (radius /
3) , cy - (radius /
4),
1, Math.PI *
2, false);
63 document.getElementById(
"demodiv"),
66 var r =
"xval,default,triangle,square,diamond,pentagon,hexagon,circle,star,plus,ex,custom\n";
67 for (var i=
1; i<=
20; i++) {
69 for (var j =
0; j <
11; j++) {
70 r +=
"," + j + (i /
3);
79 highlightCircleSize :
8,
81 drawPointCallback : Dygraph.Circles.DEFAULT,
82 drawHighlightPointCallback : Dygraph.Circles.DEFAULT
85 drawPointCallback : Dygraph.Circles.TRIANGLE,
86 drawHighlightPointCallback : Dygraph.Circles.TRIANGLE
89 drawPointCallback : Dygraph.Circles.SQUARE,
90 drawHighlightPointCallback : Dygraph.Circles.SQUARE
93 drawPointCallback : Dygraph.Circles.DIAMOND,
94 drawHighlightPointCallback : Dygraph.Circles.DIAMOND
97 drawPointCallback : Dygraph.Circles.PENTAGON,
98 drawHighlightPointCallback : Dygraph.Circles.PENTAGON
101 drawPointCallback : Dygraph.Circles.HEXAGON,
102 drawHighlightPointCallback : Dygraph.Circles.HEXAGON
105 drawPointCallback : Dygraph.Circles.CIRCLE,
106 drawHighlightPointCallback : Dygraph.Circles.CIRCLE
109 drawPointCallback : Dygraph.Circles.STAR,
110 drawHighlightPointCallback : Dygraph.Circles.STAR
113 drawPointCallback : Dygraph.Circles.PLUS,
114 drawHighlightPointCallback : Dygraph.Circles.PLUS
117 drawPointCallback : Dygraph.Circles.EX,
118 drawHighlightPointCallback : Dygraph.Circles.EX
121 drawPointCallback : frown,
122 drawHighlightPointCallback : smile