diff --git a/lib/graph3d/Graph3d.js b/lib/graph3d/Graph3d.js index 7ae09e45..a6c47238 100644 --- a/lib/graph3d/Graph3d.js +++ b/lib/graph3d/Graph3d.js @@ -1394,7 +1394,7 @@ Graph3d.prototype._redrawAxis = function() { var xLabel = this.xLabel; if (xLabel.length > 0) { yOffset = 0.1 / this.scale.y; - xText = xRange.center() / 2; + xText = (xRange.max + 3*xRange.min)/4; yText = (armVector.x > 0) ? yRange.min - yOffset: yRange.max + yOffset; text = new Point3d(xText, yText, zRange.min); this.drawAxisLabelX(ctx, text, xLabel, armAngle); @@ -1405,7 +1405,7 @@ Graph3d.prototype._redrawAxis = function() { if (yLabel.length > 0) { xOffset = 0.1 / this.scale.x; xText = (armVector.y > 0) ? xRange.min - xOffset : xRange.max + xOffset; - yText = yRange.center() / 2; + yText = (yRange.max + 3*yRange.min)/4; text = new Point3d(xText, yText, zRange.min); this.drawAxisLabelY(ctx, text, yLabel, armAngle); @@ -1417,7 +1417,7 @@ Graph3d.prototype._redrawAxis = function() { offset = 30; // pixels. // TODO: relate to the max width of the values on the z axis? xText = (armVector.x > 0) ? xRange.min : xRange.max; yText = (armVector.y < 0) ? yRange.min : yRange.max; - zText = zRange.center() / 2; + zText = (zRange.max + 3*zRange.min)/4; text = new Point3d(xText, yText, zText); this.drawAxisLabelZ(ctx, text, zLabel, offset);