Skip to content

Conversation

@owenmoon1
Copy link

Feature: Add extraLinesData support to CandlestickChart

Adds extraLinesData support to the CandlestickChart, implementing the same functionality available in LineChart.

Changes:

  • ✅ Added extraLinesData parameter to CandlestickChartData
  • ✅ Updated painter to draw horizontal and vertical extra lines
  • ✅ Added equality tests for the new functionality
  • ✅ Updated example app with median price line demonstration
  • ✅ Updated CHANGELOG.md

Use Case:

This feature enables traders and developers to draw reference lines on candlestick charts, such as:

  • Support/Resistance levels
  • Moving averages
  • Median prices
  • Any custom horizontal or vertical reference lines

Example:

See the updated candlestick_chart_sample1.dart for a working example showing a yellow median price line across Bitcoin prices.

Testing:

  • ✅ All 564 tests passing
  • ✅ No linter errors
  • ✅ Code properly formatted

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 25, 2025

Thanks, Owen, it already looks good to me.
Can you please update our candlestick_chart.md file to add the new property there?

@codecov
Copy link

codecov bot commented Oct 25, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.47%. Comparing base (32e75f5) to head (808c5a8).

Files with missing lines Patch % Lines
...t/candlestick_chart/candlestick_chart_painter.dart 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2016      +/-   ##
==========================================
- Coverage   92.49%   92.47%   -0.02%     
==========================================
  Files          50       50              
  Lines        3731     3735       +4     
==========================================
+ Hits         3451     3454       +3     
- Misses        280      281       +1     
Flag Coverage Δ
flutter 92.47% <75.00%> (-0.02%) ⬇️

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 26, 2025

Can you please add the unit tests for the new changes?

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