-
Notifications
You must be signed in to change notification settings - Fork 463
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
fix: properly treat Bar.base with stacked Bars #1423
Conversation
This also allows the use of bars with log scales
9e335eb
to
789ce80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current behaviour makes sense, given that if you plot in log space, and base is 10, and y value is 100, you want a bar from |
@maartenbreddels Are you still looking to pursue this? Looks not not based on the last comment, but I thought I'd ask 😃 |
Yeah, I think this is ready for review/merge. I just expressed I disagreed with Martin. Also, as it is now, the behaviour is the same as before, so non-breaking. |
@mariobuikhuizen and I looked at this, we think this is an improvement, replaces #1375 and fixes #1300 Good to merge @martinRenou ? |
It fixes a 'subset' of #1300, which is LogScale with non-negative values and a non-negative base (which the user has to set). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thank you @martinRenou ! meeseeksdev backport to 0.12.x ? |
Something went wrong ... Please have a look at my logs. It seems that the branch you are trying to backport to does not exist. |
* fix: property treat Bar.base with stacked Bars This also allows the use of bars with log scales * treat positive and negative bins separately
* fix: property treat Bar.base with stacked Bars This also allows the use of bars with log scales * treat positive and negative bins separately
This also allows the use of bars with log scales
bug
We currently subtract
base
(baseValue in js code) each time from the value, which caused stacked bars to not show correct values. See demonstration of the bug:Code to reproduce:
solution
I've refactored the code a bit, which makes it easier to comprehend I think, and corrected the double subtraction.
Bars now behave as I expect:
There are a few issues/cornercase: