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

Add feature to add dashed border around a bar #1144

Closed
SayuruSandaru opened this issue Sep 13, 2022 · 5 comments · Fixed by #1459
Closed

Add feature to add dashed border around a bar #1144

SayuruSandaru opened this issue Sep 13, 2022 · 5 comments · Fixed by #1459
Labels
Bar Chart enhancement New feature or request good first issue Good for newcomers

Comments

@SayuruSandaru
Copy link

Please enable to add a feature to add dashed border to a bar in the barchart. This can useful when the user need to present a predicted data in the future. Below is a sample graph that I took from an app.

3-mint-ios (2)

@imaNNeo imaNNeo added enhancement New feature or request Bar Chart good first issue Good for newcomers labels Sep 17, 2022
@Dartek12
Copy link
Contributor

Dartek12 commented Oct 1, 2023

Related issue: #1194

@k0psutin
Copy link
Contributor

Hey!

I have been working with Flutter for about a year now. I've been using fl_chart in few of my projects. I really like this project so I would like to contribute to the project and I would like to do this feature. :)

I was thinking that, we could add dashArray parameter to BarChartRodData and use that together with drawPath.

I'll read up on the contributing guidelines on the way. :)

@k0psutin
Copy link
Contributor

k0psutin commented Oct 13, 2023

@imaNNeo Is it intentional that, the border is drawn before drawStackItemBorderStroke? If the border is drawn before drawStackItemBorderStroke, then the BarChartRodStackItem will eat away some of the border, see pic:

Näyttökuva 2023-10-13 211822

It's only noticeable on really thick borders. On the other hand, if we draw the border last, we will get:

Näyttökuva 2023-10-13 212154Näyttökuva 2023-10-13 212229

@imaNNeo
Copy link
Owner

imaNNeo commented Nov 24, 2023

Landed in 0.65.0
Check it out!

@imaNNeo
Copy link
Owner

imaNNeo commented Nov 24, 2023

@imaNNeo Is it intentional that, the border is drawn before drawStackItemBorderStroke? If the border is drawn before drawStackItemBorderStroke, then the BarChartRodStackItem will eat away some of the border, see pic:

I can't recall the intention behind that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bar Chart enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants