Skip to content

Request for Feature: Rounded Corners for Stacked Bar Chart Rods #1888

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

Open
NJashwanth opened this issue Apr 1, 2025 · 1 comment
Open

Request for Feature: Rounded Corners for Stacked Bar Chart Rods #1888

NJashwanth opened this issue Apr 1, 2025 · 1 comment

Comments

@NJashwanth
Copy link

Description: I am currently working with the fl_chart package and am trying to implement a stacked bar chart where each individual bar (or segment) in the stack has rounded corners. While the package provides an excellent feature set, I am not sure if there is a built-in way to apply rounded corners to each individual segment of a stacked bar.

Problem: I need to create a stacked bar chart where each stacked segment has rounded corners on both the top and bottom. However, it seems that the current version of the package does not allow for this behavior directly.

Expected Behavior:

Each BarChartRodStackItem (or the individual segments of a stacked bar) should support having rounded corners applied to both the top and bottom of each segment.

Current Implementation: I have attempted to apply rounded corners using the borderRadius property on BarChartRodData, but this only seems to work for individual bars and not for stacked bars. Here is the code snippet I tried:

BarChartRodStackItem(0, 2.0, CustomColors.teal), BarChartRodStackItem(2.0, 4.0, CustomColors.magenta),

In addition to that, I tried to implement borderRadius at the WhiskerBarChartBarData level, but the results were not as expected, with only some parts of the bars having rounded corners.

Feature Request: Could you confirm if rounded corners for stacked bar segments are supported in the current version of fl_chart? If not, is there any plan to add this feature in future releases?

If it's not supported, would you be able to suggest an alternative approach or possible workaround to achieve rounded corners for stacked bars?

@sinelser
Copy link

Also it would be great to be able to define gradient for BarChartRodStackItem

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

No branches or pull requests

2 participants