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

Calculate exponent for intervals based on range between values #120

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kronthto
Copy link

@kronthto kronthto commented Feb 13, 2018

Explanation About What Code Achieves:
  • Aims to resolve Chart [min, max] does not optimise for values #100 (In some edge cases there was lots of blank space and no meaningful chart)
  • This adds a flag to use the range between the values to calculate the exponent for the interval generation rather than the absolute numbers
Screenshots/GIFs:

Before: frappe_linechart_y_29xxx_30xxx_before_120

After: frappe_linechart_y_29xxx_30xxx_after_120

Steps To Test:
  • Set y_axis_exp_based_on_range: true on a line chart. I added this opt-in-flag to not break existing apps where the charts are intended in the current way.
TODOs:
  • I didn't commit the compiled files
  • I only modified lines where a minValue is passed (-> only Line-charts in general). I figured if it is 0 by default nothing would change by using the range for exponent calculation.

…on-range

 Conflicts:
	src/js/charts/AxisChart.js
	src/js/charts/LineChart.js
	src/js/utils/intervals.js
@kronthto
Copy link
Author

I merged the v1.0.0 changes from master to this PR and adjusted to what has changed.

@pratu16x7 pratu16x7 force-pushed the master branch 2 times, most recently from 2db5155 to 423dc52 Compare April 21, 2018 13:52
@scmmishra scmmishra self-assigned this Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chart [min, max] does not optimise for values
2 participants