diff --git a/src/models/axis.js b/src/models/axis.js index 1900f5b79..746a16dad 100644 --- a/src/models/axis.js +++ b/src/models/axis.js @@ -196,7 +196,7 @@ nv.models.axis = function() { axisLabel .style('text-anchor', rotateYLabel ? 'middle' : 'begin') .attr('transform', rotateYLabel ? 'rotate(90)' : '') - .attr('y', rotateYLabel ? (-Math.max(margin.right, width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart + .attr('y', rotateYLabel ? (-Math.max(margin.right, width) + 12 - (axisLabelDistance || 0)) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart .attr('x', rotateYLabel ? (d3.max(scale.range()) / 2) : axis.tickPadding()); if (showMaxMin) { axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')