The documentation for ticktext and tickvals states that "Only has an effect if tickmode is set to "array"."
The opposite of this is true, if the X axis is datetime type (or detected to be such). In this case, by adding tickmode: "array" to the xaxis options, the ticktext and tickmode values are totally ignored. Removing the tickmode setting produces the desired behaviour but is completely counter to what the documentation says.
Here is an example without tickmode being set, and the X axis tick labels are as wanted, adding in tickmode: "array" to the xaxis options will cause it to revert to automatic date labels: https://codepen.io/etpinard/pen/YWEdJX
Fixing the code would be best (although will create breaking changes for users of this quirk) but fixing the documentation would be a good start...
The documentation for ticktext and tickvals states that "Only has an effect if
tickmodeis set to "array"."The opposite of this is true, if the X axis is datetime type (or detected to be such). In this case, by adding
tickmode: "array"to thexaxisoptions, theticktextandtickmodevalues are totally ignored. Removing thetickmodesetting produces the desired behaviour but is completely counter to what the documentation says.Here is an example without
tickmodebeing set, and the X axis tick labels are as wanted, adding intickmode: "array"to the xaxis options will cause it to revert to automatic date labels: https://codepen.io/etpinard/pen/YWEdJXFixing the code would be best (although will create breaking changes for users of this quirk) but fixing the documentation would be a good start...