Skip to content

Conversation

@kamilJ96
Copy link
Contributor

Resolves #919

This PR adds a gradient property on BarChartRodStackItem, which displays a stacked chart rod with a gradient if provided.

Saw there was an attempt at this already, but no activity on that for a few weeks now and I'm needing this feature and impatient 😛

Unfortunately dart doesn't support both optional positional arguments and named arguments, so the constructor signature is not ideal, however this avoids a breaking change as opposed to updating color to a named argument. If there's a better way, or we make that breaking change, let me know.

I've also updated a sample bar chart to show the effect.

Screenshot 2025-08-26 at 11 09 26 pm

@codecov
Copy link

codecov bot commented Aug 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.51%. Comparing base (06835da) to head (f865292).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1979   +/-   ##
=======================================
  Coverage   92.51%   92.51%           
=======================================
  Files          50       50           
  Lines        3712     3714    +2     
=======================================
+ Hits         3434     3436    +2     
  Misses        278      278           
Flag Coverage Δ
flutter 92.51% <100.00%> (+<0.01%) ⬆️

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 Aug 31, 2025

Simple and neat!
Thank you very much for your nice PR

@imaNNeo imaNNeo merged commit 5c1f054 into imaNNeo:main Aug 31, 2025
4 checks passed
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.

Include gradient field to BarChartRodStackItem

2 participants