From a9fc39abdae6dc2af47a72e8d8f28d8692d1e73d Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Thu, 3 Sep 2009 06:31:41 +0000 Subject: [PATCH] add grid color and dot size parameters --- dygraph.js | 3 ++- tests/grid_dot.html | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 tests/grid_dot.html diff --git a/dygraph.js b/dygraph.js index 53a7272..4f5eca5 100644 --- a/dygraph.js +++ b/dygraph.js @@ -75,6 +75,7 @@ DateGraph.AXIS_LINE_WIDTH = 0.3; // Default attribute values. DateGraph.DEFAULT_ATTRS = { + highlightCircleSize: 3, pixelsPerXLabel: 60, labelsDivWidth: 250, labelsDivStyles: { @@ -498,7 +499,7 @@ DateGraph.prototype.mouseMove_ = function(event) { } // Clear the previously drawn vertical, if there is one - var circleSize = 3; + var circleSize = this.attrs_.highlightCircleSize; var ctx = this.canvas_.getContext("2d"); if (this.previousVerticalX_ >= 0) { var px = this.previousVerticalX_; diff --git a/tests/grid_dot.html b/tests/grid_dot.html new file mode 100644 index 0000000..789b7aa --- /dev/null +++ b/tests/grid_dot.html @@ -0,0 +1,34 @@ + + + Custom grid and Dot + + + + + + +

Dot and lines should be extra large. Grid is red.

+
+ + + + -- 2.7.4