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

LineChart should not anchor the Y axis at zero #92

Closed
mum4k opened this issue Jan 26, 2019 · 6 comments
Closed

LineChart should not anchor the Y axis at zero #92

mum4k opened this issue Jan 26, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@mum4k
Copy link
Owner

mum4k commented Jan 26, 2019

This loses precision when there are only higher positive values.

The min on the Y axis should be equal to the lowest provided value.

@mum4k
Copy link
Owner Author

mum4k commented Jan 26, 2019

This is now fixed in the devel branch and will be in the next release.

@mum4k mum4k closed this as completed Jan 26, 2019
@activeshadow
Copy link

This worked great @mum4k thanks!

image

@activeshadow
Copy link

@mum4k perhaps make it an option that can be passed to the line chart? Some people may still want it anchored at 0... especially ones already using it for that purpose.

@mum4k mum4k reopened this Jan 27, 2019
@mum4k
Copy link
Owner Author

mum4k commented Jan 27, 2019

Thanks for the screenshot @activeshadow, glad to see this working.

That is a valid point, we can add an option to control this behaviour. I wonder which of the two should be the default. Looking at how linecharts in spreadsheets behave - they anchor at zero by default. Would you be ok with that being the default behaviour and an option to remove the zero-anchor?

That would make this change backward compatible. Let me know what you think.

@activeshadow
Copy link

@mum4k having it be an option and making the default value be anchored at zero so the change is backwards compatible sounds great! Thanks!

@mum4k
Copy link
Owner Author

mum4k commented Jan 27, 2019

PR #96 is now merged into the devel branch. It adds a new linechart.YAxisAdaptive() option. Please give it a try and let me know if something doesn't work as expected.

Thanks again for pointing out that this was going to introduce a backward-incompatible change.

@mum4k mum4k closed this as completed Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants