},
axisLabelWidth : {
type : "int",
- // scope : [ "x", "y", "y2" ]
+ // scope : [ "global", "x", "y", "y2" ]
},
axisLineColor : {
type : "string",
- // scope : [ "x", "y", "y2" ]
+ scope : [ "global", "x", "y", "y2" ]
},
axisLineWidth : {
type : "int",
- // scope : [ "x", "y", "y2" ]
+ scope : [ "global", "x", "y", "y2" ]
},
axisTickSize : {
type : "int",
- // scope : [ "x", "y", "y2" ]
+ // scope : [ "global", "x", "y", "y2" ]
},
clickCallback : {
type : "function(e, x, points)"
"use strict";
/*
-
Bits of jankiness:
- Direct layout access
- Direct area access
- Should include calculation of ticks, not just the drawing.
+Options left to make axis-friendly.
+ ('axisTickSize')
+ ('drawAxesAtZero')
+ ('xAxisHeight')
+
+These too. What is the difference between axisLablelWidth and {x,y}AxisLabelWidth?
+ ('axisLabelWidth')
+ ('xAxisLabelWidth')
+ ('yAxisLabelWidth')
*/
/**
// axis lines
context.save();
- context.strokeStyle = g.getOption('axisLineColor');
- context.lineWidth = g.getOption('axisLineWidth');
var layout = g.layout_;
var area = e.dygraph.plotter_.area;
} else {
axisX = halfUp(area.x);
}
+
+ context.strokeStyle = g.getOptionForAxis('axisLineColor', 'y');
+ context.lineWidth = g.getOptionForAxis('axisLineWidth', 'y');
+
context.beginPath();
context.moveTo(axisX, halfDown(area.y));
context.lineTo(axisX, halfDown(area.y + area.h));
// if there's a secondary y-axis, draw a vertical line for that, too.
if (g.numAxes() == 2) {
+ context.strokeStyle = g.getOptionForAxis('axisLineColor', 'y2');
+ context.lineWidth = g.getOptionForAxis('axisLineWidth', 'y2');
context.beginPath();
context.moveTo(halfDown(area.x + area.w), halfDown(area.y));
context.lineTo(halfDown(area.x + area.w), halfDown(area.y + area.h));
}
}
+ context.strokeStyle = g.getOptionForAxis('axisLineColor', 'x');
+ context.lineWidth = g.getOptionForAxis('axisLineWidth', 'x');
context.beginPath();
var axisY;
if (g.getOption('drawAxesAtZero')) {