- },
- {
- drawPoints : true,
- pointSize : 5,
- highlightCircleSize : 8,
- 'default' : {
- drawPointCallback : Dygraph.Circles.DEFAULT,
- drawHighlightPointCallback : Dygraph.Circles.DEFAULT
- },
- 'triangle' : {
- drawPointCallback : Dygraph.Circles.TRIANGLE,
- drawHighlightPointCallback : Dygraph.Circles.TRIANGLE
- },
- 'square' : {
- drawPointCallback : Dygraph.Circles.SQUARE,
- drawHighlightPointCallback : Dygraph.Circles.SQUARE
- },
- 'diamond' : {
- drawPointCallback : Dygraph.Circles.DIAMOND,
- drawHighlightPointCallback : Dygraph.Circles.DIAMOND
- },
- 'pentagon' : {
- drawPointCallback : Dygraph.Circles.PENTAGON,
- drawHighlightPointCallback : Dygraph.Circles.PENTAGON
- },
- 'hexagon' : {
- drawPointCallback : Dygraph.Circles.HEXAGON,
- drawHighlightPointCallback : Dygraph.Circles.HEXAGON
- },
- 'circle' : {
- drawPointCallback : Dygraph.Circles.CIRCLE,
- drawHighlightPointCallback : Dygraph.Circles.CIRCLE
- },
- 'star' : {
- drawPointCallback : Dygraph.Circles.STAR,
- drawHighlightPointCallback : Dygraph.Circles.STAR
- },
- 'plus' : {
- drawPointCallback : Dygraph.Circles.PLUS,
- drawHighlightPointCallback : Dygraph.Circles.PLUS
- },
- 'ex' : {
- drawPointCallback : Dygraph.Circles.EX,
- drawHighlightPointCallback : Dygraph.Circles.EX
- },
- 'custom' : {
- drawPointCallback : frown,
- drawHighlightPointCallback : smile
- }
- }
- );
+ }, 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,
+ }});