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

MonotoneCubic paths feature completion #4390

Merged

Conversation

rosco54
Copy link
Contributor

@rosco54 rosco54 commented Apr 6, 2024

New Pull Request

The monotoneCubic paths feature is now complete to the same level as 'straight' and 'smooth' paths for chart types: Line, Area, RangeArea:

  • Handling of null data points.
  • Forecast data points with rangeArea series. In actuality, an issue with series of different lengths, nothing to do with forecastDataPoints but was excluded by explicit condition unnecessarily.

Refactored the createPaths() monotoneCubic branch. Several other tidy-up fixes to enable this to work.

Fix libs/monotone-cubic.js splice.slice():
Was crashing on single point slices.
NEEDS TO BE PUSHED UPSTREAM.

New sample to verify most of the above. The rangeArea series have embedded nulls (at start, end and middle) plus forecast data points that were an issue previously for monotoneCubic.

fc3noor2 (1)

The initial aim was to fix the following sample chart that broke at version 3.45.1 (shown fixed):

fc3noor2

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

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

@rosco54 rosco54 force-pushed the MonotoneCubic_paths_refactoring branch 2 times, most recently from 9f18d4b to cae2e48 Compare April 6, 2024 11:39
Line and area charts with null data points now work.
RangeArea with null data points now works.
RangeArea with forecast line combo chart now works.
Refactored to implement full series interpolation before segmenting
(segments relate to each other).

Fix libs/monotone-cubic.js splice.slice(): NEEDS TO BE PUSHED UPSTREAM
was crashing on single point slices.

New sample as a regression test to verify most of the above.
@rosco54 rosco54 force-pushed the MonotoneCubic_paths_refactoring branch from cae2e48 to 0abd03b Compare April 6, 2024 11:51
@junedchhipa junedchhipa merged commit 4604653 into apexcharts:main Apr 6, 2024
@rosco54 rosco54 deleted the MonotoneCubic_paths_refactoring branch May 5, 2024 02:36
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