[GH-ISSUE #92] LineChart should not anchor the Y axis at zero #60

Closed
opened 2026-03-03 16:22:01 +03:00 by kerem · 6 comments
Owner

Originally created by @mum4k on GitHub (Jan 26, 2019).
Original GitHub issue: https://github.com/mum4k/termdash/issues/92

Originally assigned to: @mum4k on GitHub.

This loses precision when there are only higher positive values.

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

Originally created by @mum4k on GitHub (Jan 26, 2019). Original GitHub issue: https://github.com/mum4k/termdash/issues/92 Originally assigned to: @mum4k on GitHub. This loses precision when there are only higher positive values. The min on the Y axis should be equal to the lowest provided value.
kerem 2026-03-03 16:22:01 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@mum4k commented on GitHub (Jan 26, 2019):

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

<!-- gh-comment-id:457813212 --> @mum4k commented on GitHub (Jan 26, 2019): This is now fixed in the devel branch and will be in the next release.
Author
Owner

@activeshadow commented on GitHub (Jan 27, 2019):

This worked great @mum4k thanks!

image

<!-- gh-comment-id:457877400 --> @activeshadow commented on GitHub (Jan 27, 2019): This worked great @mum4k thanks! ![image](https://user-images.githubusercontent.com/9335331/51794318-5152d880-218d-11e9-9474-bc5412bf8e83.png)
Author
Owner

@activeshadow commented on GitHub (Jan 27, 2019):

@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.

<!-- gh-comment-id:457879677 --> @activeshadow commented on GitHub (Jan 27, 2019): @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.
Author
Owner

@mum4k commented on GitHub (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.

<!-- gh-comment-id:457880006 --> @mum4k commented on GitHub (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.
Author
Owner

@activeshadow commented on GitHub (Jan 27, 2019):

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

<!-- gh-comment-id:457882469 --> @activeshadow commented on GitHub (Jan 27, 2019): @mum4k having it be an option and making the default value be anchored at zero so the change is backwards compatible sounds great! Thanks!
Author
Owner

@mum4k commented on GitHub (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.

<!-- gh-comment-id:457886257 --> @mum4k commented on GitHub (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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termdash#60
No description provided.