Skip to content
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

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

Closed
stephprobst opened this issue Apr 20, 2021 · 2 comments

Comments

@stephprobst
Copy link

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.
@archmoj
Copy link
Contributor

archmoj commented Aug 17, 2021

I was not able to replicate this using plotly.js in this codepen.

@stephprobst
Copy link
Author

I can confirm, that the issue went away since I reported it for plotly.py 4.14.1. I just tested it with plotly.py 5.2.1 and it works fine.

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