You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Categorical Axes example shows putting text in the x property and setting layout.xaxis.type = "category". However, that approach doesn't work if the x array has duplicate values, in which case Plotly removes them. For example, here's the same codepen with the value "12F" duplicated: http://codepen.io/anon/pen/peBENa (only five bars are present).
The behavior is slightly worse for heatmaps because the number of rows/cols remains the same, but the tick labels are positioned at the wrong row/col: http://codepen.io/anon/pen/JWVRWq
"Thursday" now labels what should also be "Tuesday", and "Friday" what should be "Thursday"
The Categorical Axes example shows putting text in the
x
property and settinglayout.xaxis.type = "category"
. However, that approach doesn't work if thex
array has duplicate values, in which case Plotly removes them. For example, here's the same codepen with the value "12F" duplicated: http://codepen.io/anon/pen/peBENa (only five bars are present).The behavior is slightly worse for heatmaps because the number of rows/cols remains the same, but the tick labels are positioned at the wrong row/col:
http://codepen.io/anon/pen/JWVRWq
"Thursday" now labels what should also be "Tuesday", and "Friday" what should be "Thursday"
Someone posted a work-around on Stackoverflow where the ticks are set explicitly:
http://stackoverflow.com/questions/41298571/how-to-allow-duplicate-tick-labels-in-plotly
This is a little bit cumbersome as you have to put a
d3.range
array (or similar) in thetickvals
.The text was updated successfully, but these errors were encountered: