axes: {
x: {
pixelsPerLabel: 60,
- axisLabelWidth: 55,
+ axisLabelWidth: 58, // TODO(danvk): make these 10-20px different again.
axisLabelFormatter: Dygraph.dateAxisLabelFormatter,
valueFormatter: Dygraph.dateValueFormatter,
drawGrid: true,
var xTicks = xAxisOptionsView('ticker')(
range[0],
range[1],
- this.width_, // TODO(danvk): should be area.width
+ this.plotter_.area.w, // TODO(danvk): should be area.width
xAxisOptionsView,
this);
// var msg = 'ticker(' + range[0] + ', ' + range[1] + ', ' + this.width_ + ', ' + this.attr_('pixelsPerXLabel') + ') -> ' + JSON.stringify(xTicks);
var ticker = opts('ticker');
axis.ticks = ticker(axis.computedValueRange[0],
axis.computedValueRange[1],
- this.height_, // TODO(danvk): should be area.height
+ this.plotter_.area.h,
opts,
this);
// Define the first independent axis as primary axis.
axis.ticks = ticker(axis.computedValueRange[0],
axis.computedValueRange[1],
- this.height_, // TODO(danvk): should be area.height
+ this.plotter_.area.h,
opts,
this,
tick_values);
}
},
ylabel: 'Primary y-axis',
- y2label: 'Secondary y-axis',
- yAxisLabelWidth: 60
+ y2label: 'Secondary y-axis'
}
);
}
);
- g2 = new Dygraph(
+ g3 = new Dygraph(
document.getElementById("demodiv_two"),
data,
{