Skip to content

tickmode array combined with tickson='boundaries' returns error for categorical axis  #3155

Closed
@stephprobst

Description

@stephprobst

I'm plotting offline.

Reproducible example:

import plotly.graph_objects as go

fig = go.Figure(go.Bar(
    x = ['A', 'B', 'C', 'D', 'E'],
    y = [28.8, 28.5, 37, 56.8, 69.7]
))


fig.update_layout(
    xaxis = dict(
        tickmode = 'array',
        tickvals = ['1', '3', '5'],
        ticktext = ['One', 'Three', 'Five'],
        tickson = 'boundaries'
    )
)

fig.full_figure_for_development()

Error:

ValueError: Transform failed with error code 525: Cannot read property '0' of undefined

Additional information:

  • Plotly version: 4.14.1
  • The issue only appears for categorical axis. Removing either the ticktext property or the tickson property removes the error.

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