Skip to content

Conversation

@mutludev
Copy link
Contributor

New Pull Request

.toFixed(10) was added in #4985 to address a clipping bug, but since it returns a string, direct comparison caused incorrect clipping.

Fixed by converting values to numbers with parseFloat() before comparison.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My branch is up to date with any changes from the main branch

toFixed() method returns a string, causing incorrect comparisons.

Use parseFloat() to convert values to number before comparing them.
@junedchhipa junedchhipa merged commit b702093 into apexcharts:main Mar 27, 2025
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.

2 participants