diff --git a/src/plots/gl2d/convert.js b/src/plots/gl2d/convert.js index d2e46b47a15..b3638a394c4 100644 --- a/src/plots/gl2d/convert.js +++ b/src/plots/gl2d/convert.js @@ -123,7 +123,9 @@ proto.merge = function(options) { this.tickEnable[i+j] = false; this.tickColor[i+j] = str2RGBArray((ax.tickfont || {}).color); - this.tickAngle[i+j] = (ax.tickangle === 'auto') ? 0 : -ax.tickangle; + this.tickAngle[i+j] = (ax.tickangle === 'auto') ? + 0 : + Math.PI * -ax.tickangle / 180; this.tickPad[i+j] = this.getTickPad(ax); this.tickMarkLength[i+j] = 0; diff --git a/src/plots/gl3d/layout/convert.js b/src/plots/gl3d/layout/convert.js index 0940fd528b3..c76587feeae 100644 --- a/src/plots/gl3d/layout/convert.js +++ b/src/plots/gl3d/layout/convert.js @@ -109,7 +109,9 @@ proto.merge = function(sceneLayout) { if ('tickcolor' in axes) opts.lineTickColor[i] = str2RgbaArray(axes.tickcolor); if ('tickwidth' in axes) opts.lineTickWidth[i] = axes.tickwidth; if ('tickangle' in axes) { - opts.tickAngle[i] = axes.tickangle === 'auto' ? 0 : axes.tickangle; + opts.tickAngle[i] = (axes.tickangle === 'auto') ? + 0 : + Math.PI * -axes.tickangle / 180; } //// tick labels if ('showticklabels' in axes) opts.tickEnable[i] = axes.showticklabels; diff --git a/test/image/baselines/gl3d_surface-lighting.png b/test/image/baselines/gl3d_surface-lighting.png index bc4decb7ede..a4cab9f0e25 100644 Binary files a/test/image/baselines/gl3d_surface-lighting.png and b/test/image/baselines/gl3d_surface-lighting.png differ diff --git a/test/image/mocks/gl3d_surface-lighting.json b/test/image/mocks/gl3d_surface-lighting.json index 00977a36101..9d1f0204e16 100644 --- a/test/image/mocks/gl3d_surface-lighting.json +++ b/test/image/mocks/gl3d_surface-lighting.json @@ -550,16 +550,19 @@ "xaxis": { "showbackground": true, "type": "linear", - "backgroundcolor": "rgb(255, 127, 14)" + "backgroundcolor": "rgb(255, 127, 14)", + "tickangle": 180 }, "yaxis": { "showbackground": true, "type": "linear", - "backgroundcolor": "rgb(255, 0, 0)" + "backgroundcolor": "rgb(255, 0, 0)", + "tickangle": -45 }, "zaxis": { "showbackground": true, - "backgroundcolor": "rgb(44, 160, 44)" + "backgroundcolor": "rgb(44, 160, 44)", + "tickangle": 30 } } }