-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
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"
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 the tickvals
.