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

Allow withMinimum behavior of calcYAxisParameters() to be set as opt… #259

Open
wants to merge 1 commit into
base: master
from

Conversation

@calin-marian
Copy link

@calin-marian calin-marian commented Dec 18, 2019

Allow withMinimum behavior of calcYAxisParameters() to be set as option for the chart.

Explanation About What Code Achieves:
  • I have a line chart displayed, that has the values in the range ~200k-300k. The Y axis range is 100k-300k. I would like to force the Y axis to show the range 0-300k. I identified in code the method that calculates the range, calcYAxisParameters(), and saw that it has a parameter withMinimum, but it is set automatically to true if the chart is of type 'line'. My change allows this to be set as a parameter for the chart. If it's not set, it will maintain the current behavior, so there are no breaking changes.
Screenshots/GIFs:

Before:
before
After:
after

Steps To Test:
  • Create a line chart with values in the range ~200k-300k
  • See that the chart lines go below the baseline of the chart, and the Y axis range is 100k-300k
  • Add to the options object the option: withMinimum: false
  • See that the chart lines go only to the baseline of the chart, and the Y axis range is 0-300k
TODOs:
  • None
…ion for the chart.
@coveralls
Copy link

@coveralls coveralls commented Dec 18, 2019

Pull Request Test Coverage Report for Build 150

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 38.158%

Totals Coverage Status
Change from base Build 141: 0.0%
Covered Lines: 29
Relevant Lines: 62

💛 - Coveralls
@scmmishra
Copy link
Collaborator

@scmmishra scmmishra commented Sep 16, 2020

Can you provide a codesandbox demo of this behaviour, I can't seem to replicate this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants