Skip to content

zeroline doesn't display when showline=true #2874

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
cldougl opened this issue Aug 6, 2018 · 6 comments
Closed

zeroline doesn't display when showline=true #2874

cldougl opened this issue Aug 6, 2018 · 6 comments
Labels
bug something broken

Comments

@cldougl
Copy link
Member

cldougl commented Aug 6, 2018

Using rangemode: 'tozero' and zeroline: true to always display zero line doesn't display zero line when showline=true is added to the axis.
Example: https://codepen.io/plotly/pen/WvPgPP?editors=1010

@cldougl cldougl added the bug something broken label Aug 6, 2018
@etpinard
Copy link
Contributor

etpinard commented Aug 7, 2018

Looks like that's on-purpose from the !ax.showline part of

showZl = (rng[0] * rng[1] <= 0) && ax.zeroline &&
(ax.type === 'linear' || ax.type === '-') && gridvals.length &&
(hasBarsOrFill || clipEnds({x: 0}) || !ax.showline);

@etpinard
Copy link
Contributor

etpinard commented Aug 7, 2018

.... not sure why though.

@alexcjohnson
Copy link
Collaborator

I suspect that was intended to be the opposite axis showline - so we don't show two lines nearly on top of each other. Notice that that's the effect it has - if you move zero just a little away from the end of the axis, the zero line will show up again.

Nice catch @cldougl

@yifan-yang
Copy link

@cldougl when do you think this can be deployed?

@cldougl
Copy link
Member Author

cldougl commented Aug 9, 2018

@yifan-yang the activity will be logged in this issue.

@yifan-yang
Copy link

@cldougl thanks, what would be the usual ETA for such case?

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