/**
- * @fileoverview Test cases for the option "stepPlot" especially for the
- * scenario where the option is not set for the whole graph but
- * for single series.
+ * @fileoverview Test cases for the per-axis grid options, including the new
+ * option "gridLinePattern".
*
* @author david.eberlein@ch.sauter-bc.com (Fr. Sauter AG)
*/
-var StepTestCase = TestCase("grid_per_axis");
+var GridPerAxisTestCase = TestCase("grid-per-axis");
-StepTestCase.prototype.setUp = function() {
+GridPerAxisTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
};
-StepTestCase.origFunc = Dygraph.getContext;
+GridPerAxisTestCase.origFunc = Dygraph.getContext;
-StepTestCase.prototype.setUp = function() {
+GridPerAxisTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
- return new Proxy(StepTestCase.origFunc(canvas));
+ return new Proxy(GridPerAxisTestCase.origFunc(canvas));
};
};
-StepTestCase.prototype.tearDown = function() {
- Dygraph.getContext = StepTestCase.origFunc;
+GridPerAxisTestCase.prototype.tearDown = function() {
+ Dygraph.getContext = GridPerAxisTestCase.origFunc;
};
-StepTestCase.prototype.testIndependantGrids = function() {
+GridPerAxisTestCase.prototype.testIndependentGrids = function() {
var opts = {
width : 480,
height : 320,
}
};
-StepTestCase.prototype.testPerAxisGridColors = function() {
+GridPerAxisTestCase.prototype.testPerAxisGridColors = function() {
var opts = {
width : 480,
height : 320,
}
}
};
-StepTestCase.prototype.testPerAxisGridWidth = function() {
+GridPerAxisTestCase.prototype.testPerAxisGridWidth = function() {
var opts = {
width : 480,
height : 320,
0, 0, 0, 0 ], Util.samplePixel(g.hidden_, x + 2, y));
}
};
-StepTestCase.prototype.testGridLinePattern = function() {
+GridPerAxisTestCase.prototype.testGridLinePattern = function() {
var opts = {
width : 480,
height : 320,
[ "cx" , "center x coordinate" ],
[ "cy" , "center y coordinate" ],
[ "color" , "series color" ],
- [ "pointSize" , "the radius of the image." ]
+ [ "pointSize" , "the radius of the image." ],
[ "idx" , "the row-index of the point in the data."]
],
"description": "Draw a custom item when drawPoints is enabled. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy). Also see <a href='#drawHighlightPointCallback'>drawHighlightPointCallback</a>"
[ "cx" , "center x coordinate" ],
[ "cy" , "center y coordinate" ],
[ "color" , "series color" ],
- [ "pointSize" , "the radius of the image." ]
+ [ "pointSize" , "the radius of the image." ],
[ "idx" , "the row-index of the point in the data."]
],
"description": "Draw a custom item when a point is highlighted. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy) Also see <a href='#drawPointCallback'>drawPointCallback</a>"
"description" : "Depricated: Use the per-axis option drawGrid instead. Whether to display horizontal gridlines under the chart."
},
"drawGrid": {
- "default": "true for x and y, false for y2",
- "labels": ["Grid"],
- "type": "boolean",
- "description" : "Whether to display gridlines in the chart. This may be set on a per-axis basis to define the visibility of each axis' grid separately."
+ "default": "true for x and y, false for y2",
+ "labels": ["Grid"],
+ "type": "boolean",
+ "description" : "Whether to display gridlines in the chart. This may be set on a per-axis basis to define the visibility of each axis' grid separately."
},
"independentTicks": {
- "default": "true for x and y, false for y2",
- "labels": ["Grid, Axis display"],
- "type": "boolean",
- "description" : "By default, the y2 axis inherits the tick positions of the primary (y) axis. However, if an axis is specifically marked as having independent ticks, then that is permissible as well. This MUST be set on a per-axis basis to define the position of each axis' grid and labels separately."
+ "default": "true for x and y, false for y2",
+ "labels": ["Axis display", "Grid"],
+ "type": "boolean",
+ "description" : "By default, the y2 axis inherits the tick positions of the primary (y) axis. However, if an axis is specifically marked as having independent ticks, then that is permissible as well. This MUST be set on a per-axis basis to define the position of each axis' grid and labels separately."
},
"drawXAxis": {
"default": "true",