- },
- {
- drawPoints : true,
- pointSize : 6,
- 'default' : { drawPointCallback : Dygraph.Circles.DEFAULT },
- 'triangle' : { drawPointCallback : Dygraph.Circles.TRIANGLE },
- 'square' : { drawPointCallback : Dygraph.Circles.SQUARE },
- 'diamond' : { drawPointCallback : Dygraph.Circles.DIAMOND },
- 'pentagon' : { drawPointCallback : Dygraph.Circles.PENTAGON },
- 'hexagon' : { drawPointCallback : Dygraph.Circles.HEXAGON },
- 'circle' : { drawPointCallback : Dygraph.Circles.CIRCLE },
- 'star' : { drawPointCallback : Dygraph.Circles.STAR },
- 'plus' : { drawPointCallback : Dygraph.Circles.PLUS },
- 'ex' : { drawPointCallback : Dygraph.Circles.EX },
- 'custom' : { drawPointCallback : smile, drawHighlightCallback : frown }
- }
- );
+ }, opts);
+ };
+
+ makeGraph(
+ "Gallery of predefined shapes, adding a custom shape:",
+ function(x, c, n) {
+ return x / 3 + c * 10;
+ }, {
+ highlightCircleSize : 8
+ });
+ makeGraph(
+ "With interactive per-series highlighting:",
+ function(x, c, n) {
+ return Math.sin(x * c / n);
+ }, {
+ strokeBorderWidth: 2,
+ highlightSeriesOpts: {
+ pointSize: 6,
+ highlightCircleSize: 10,
+ strokeWidth: 2,
+ }});