react-native-svg-charts icon indicating copy to clipboard operation
react-native-svg-charts copied to clipboard

bar chart rounded top

Open raygerrard opened this issue 7 years ago • 14 comments

is it possible to have rounded top left and right corners on a bar chart?

raygerrard avatar Aug 08 '18 14:08 raygerrard

Doubtful, @raygerrard

(based on this comment)

phunkren avatar Aug 09 '18 18:08 phunkren

I altered the library to do this for my own project. Not the prettiest, but it is working. Might be helpful for inspiration:

https://github.com/vjsingh/react-native-svg-charts/commit/3aa87dd1ab33df5542eb65cc6d80d5e9d66351c3

https://github.com/vjsingh/react-native-svg-charts/commit/eee9f210243d0395b57595c18b5b3d67ed1a7751

vjsingh avatar Aug 22 '18 14:08 vjsingh

@vjsingh could you make a PR maybe?

antoinerousseau avatar Aug 23 '18 08:08 antoinerousseau

@antoinerousseau maybe, would have to clean up the code quite a bit.

@JesperLekland Are you interested in a PR that adds an API for rounded corners to BarChart and StackedBarChart?

vjsingh avatar Aug 23 '18 12:08 vjsingh

and maybe the path can be replaced by a Rect for simpler code?

antoinerousseau avatar Aug 23 '18 12:08 antoinerousseau

In my consideration of this feature I would definitely use Rect. Would be very interested in a PR 👍

JesperLekland avatar Aug 24 '18 12:08 JesperLekland

@vjsingh Thanks for the offer, but that implementation is unfortunately way too complex. Cool solution though 👍

JesperLekland avatar Aug 24 '18 12:08 JesperLekland

@JesperLekland Thanks, it's a bit hacked together. I didn't think anyone would ever see this code =)

I can make a PR. The issue is, is there a way to only round some of the corners with Rect? That was the motivation, since rounding all the bars in a stacked bar chart it doesn't look good. We could of course hide the complexity behind our own Rect abstraction

vjsingh avatar Aug 24 '18 13:08 vjsingh

Hello is there any progress on rounding the top corners in the BarChart?

mafiusu avatar Apr 01 '19 14:04 mafiusu

Hi Guys, Anybody working on this ?

ddnatu avatar Apr 05 '19 14:04 ddnatu

Anybody working on this ?

smismailalam avatar Jul 20 '20 07:07 smismailalam

Yep, I'd be very interested in rounded corners (even bottom corners) for BarChart. Unfortunately, I don't have time to work on some PR. Maybe I'll try to dig a bit into the lib to see what I can do.

ajacquierbret avatar Jul 26 '20 09:07 ajacquierbret

I moved over to Victory charts, been a lot happier with that library. It's better maintained I think.

vjsingh avatar Jul 26 '20 15:07 vjsingh

Hi @vjsingh I have checked this but this is not worked for me as i am using BarChart. let me know if there is any changes to do in BarGraph also.

puneetkansal04 avatar Nov 29 '22 13:11 puneetkansal04