'];
function addLabels(axis, labelGenerator) {
for (var i = 0; i < axis.ticks.length; ++i) {
var tick = axis.ticks[i];
if (!tick.label || tick.v < axis.min || tick.v > axis.max)
continue;
html.push(labelGenerator(tick, axis));
}
}
var margin = options.grid.labelMargin + options.grid.borderWidth;
addLabels(axes.xaxis, function (tick, axis) {
return '
' + tick.label + "
";
});
addLabels(axes.yaxis, function (tick, axis) {
return '
' + tick.label + "
";
});
addLabels(axes.x2axis, function (tick, axis) {
return '
' + tick.label + "
";
});
addLabels(axes.y2axis, function (tick, axis) {
return '
' + tick.label + "
";
});
html.push('
');
target.appendChild(DOM.createElementFromMarkup(html.join("")));
}
function insertAxisLabels() {
var xLocation, yLocation;
if( options.xaxis.label ) {
yLocation = plotOffset.top + plotHeight + ( axes.xaxis.labelHeight * 1.5 );
xLocation = plotOffset.left;
DOM.getElementsByClassName("xaxislabel", "div", target, DOM.removeElement);
target.appendChild(
DOM.createElementFromMarkup(
"