Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/plots/gl2d/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're like me, I find this way more explicit than having some degrees-to-radians lib function.

But, I'd be ok with adding a lib function if preferable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good w/ it here

this.tickPad[i+j] = this.getTickPad(ax);

this.tickMarkLength[i+j] = 0;
Expand Down
4 changes: 3 additions & 1 deletion src/plots/gl3d/layout/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file modified test/image/baselines/gl3d_surface-lighting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions test/image/mocks/gl3d_surface-lighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down