Skip to content

Category-axis bar chart has incorrect width if category label equals endpoint of autocomputed range #4812

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
airtable-MartinMichelsen opened this issue May 5, 2020 · 4 comments
Labels
bug something broken

Comments

@airtable-MartinMichelsen

For bar charts with category-labeled x axes, Plotly automatically computes an x-axis range based on the number of bars in the chart, which seems to be [-0.5, numBars - 0.5]. The chart doesn't render properly if one of the range endpoints happens to be equal to a category name. In the following example, the graph is cut off with the bar labeled '2.5' being partially out of frame and the bar labeled '3.0' not rendering at all:
https://codepen.io/mmichelsen/pen/LYpebKj

If you change '2.5' to anything other than '-0.5' or '2.5', the graph renders properly.

@claraPag
Copy link

Hi, i am having exactly the same issue describe above.. Is there any action taken on your side to resolve this very annoying issue ? Thank you in advance for your help

@airtable-MartinMichelsen
Copy link
Author

Appending a zero (e.g. changing "2.5" to "2.50" works around the issue.

@nicolaskruchten nicolaskruchten added the bug something broken label Sep 10, 2020
@LoganWlv
Copy link
Contributor

@nicolaskruchten this one relates to #5200 which is fixed

@nicolaskruchten
Copy link
Contributor

Indeed, your fix in #5211 seems to have resolved this one, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

4 participants