-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[XYChart] fixed incorrect spacing between data points #5556
[XYChart] fixed incorrect spacing between data points #5556
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5556 +/- ##
=======================================
Coverage 5.73% 5.73%
=======================================
Files 278 278
Lines 42019 42019
Branches 516 516
=======================================
Hits 2409 2409
Misses 39610 39610
Flags with carried forward coverage won't be shown. Click here to find out more.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
@OG-NI, Thank you for the contribution! |
📑 Summary
This fixes the issue of XYCharts, where the spacing between the data points is sometimes incorrect and some data points not being displayed.
Resolves #5555
📏 Design Decisions
The formula calculating the distance between two data points when using a numeric range on the x-axis has been changed from
const step = (max - min + 1) / data.length;
toconst step = (max - min) / (data.length - 1);
. This maps the first value to the minimum on the x-axis, the last value to the maximum and evenly distributes all other values between the two ends.The changes made do not affect the way any existing demo chart is being rendered.
Feel free to ask if any additional documentation is needed.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch