Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Documentation incorrectly states tickmode *must* be "array" for tickvals/ticktext to work #4908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stringfellow opened this issue Jun 9, 2020 · 1 comment

Comments

@stringfellow
Copy link

stringfellow commented Jun 9, 2020

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...

@archmoj
Copy link
Contributor

archmoj commented Jun 9, 2020

Thanks for the report. The bug is fixed in #4851 and would be reflected in v1.54.2 release.

@archmoj archmoj closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants