Skip to content

Text missing if axis range is reversed and cliponaxis=false #2531

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
darabos opened this issue Apr 6, 2018 · 1 comment
Closed

Text missing if axis range is reversed and cliponaxis=false #2531

darabos opened this issue Apr 6, 2018 · 1 comment

Comments

@darabos
Copy link
Contributor

darabos commented Apr 6, 2018

I have a pull request (darabos#1) for it, but I made it against my own repo now to follow the contribution guidelines.

I committed the "before" baseline to demonstrate the issue. You can see the fix in the second commit's diff:
cliponaxis-before-after

This example is a bit unusual. Who uses upside-down bar charts?! In real life I hit this issue with a horizontal bar chart where I wanted the order of the groups in the chart to match the order in the legend:
horizontal-bar-chart

I set autorange: 'reverse' and the texts disappeared:
bars-reversed

If I remove cliponaxis: false, the texts are clipped:
bars-clipped

I'm open to suggestions, but my PR is aimed at fixing the version with the missing texts. Thanks!

@etpinard
Copy link
Contributor

etpinard commented Apr 6, 2018

Thanks very much for bringing this up!

Looks fix is looking great. I made one minor comment -> https://github.com/darabos/plotly.js/pull/1/files#r179756565

PR away 🚀

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