Skip to content

Conversation

@huanghui1998hhh
Copy link
Contributor

@huanghui1998hhh huanghui1998hhh commented Sep 17, 2025

This PR enhances the curve API:

  1. Keeps the existing curve algorithm.
  2. Add a new curve algorithm copied from ECharts.
  3. Allows users to provide their own curve drawing logic in whatever way they prefer.
  4. Fully preserved the existing implicit animation when toggling between curved and straight lines.
  5. The old API has not been removed. It is marked as deprecated and remains backward-compatible.
Before (old params) After (new param)
isCurved: false curve: LineChartCurve.noCurve
isCurved: true curve: const LineChartCubicTensionCurve()
isCurved: true, curveSmoothness: S, preventCurveOverShooting: P, preventCurveOvershootingThreshold: T curve: const LineChartCubicTensionCurve(smoothness: S, preventCurveOverShooting: P, preventCurveOvershootingThreshold: T)

I’m not entirely sure whether these decisions align with your original vision, please give me some advice. I'll complete the follow-up work.
@imaNNeo

@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 99.31973% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.91%. Comparing base (32e75f5) to head (47e5dbc).

Files with missing lines Patch % Lines
lib/src/chart/line_chart/line_chart_curve.dart 99.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2000      +/-   ##
==========================================
+ Coverage   92.49%   92.91%   +0.42%     
==========================================
  Files          50       51       +1     
  Lines        3731     3855     +124     
==========================================
+ Hits         3451     3582     +131     
+ Misses        280      273       -7     
Flag Coverage Δ
flutter 92.91% <99.31%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 25, 2025

It looks good!
Can you please write the needed unit-tests and update the documentation? both in our dart code and markdown files.

@huanghui1998hhh
Copy link
Contributor Author

huanghui1998hhh commented Oct 28, 2025

@imaNNeo Done! Please review.

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