Skip to content

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

Closed
@stringfellow

Description

@stringfellow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions