ghalex / vue3-charts

Vue3-Charts is an SVG-based charting library that is very easy to use and highly customizable
https://vue3charts.org
MIT License
135 stars 23 forks source link

Add Pie chart #17

Closed pvanagtmaal closed 2 years ago

pvanagtmaal commented 2 years ago

Hi :) First of all, thank you for the nice library, this was exactly what I was looking for.

I also needed a Pie chart, so I decided to implement one and contribute to the library.

There is one "big" thing I'm uncertain about:

I needed to be able to control the Tooltip hide/show more than currently possible. The way I decided to go is to be able to configure the Chart in such a way that it just early-exits in the event handlers. The reason for the additional event control is that the tooltip needs to be hidden when leaving the pie, which isn't a simple rectangle like the other components.

Another small thing: I added some random colors as a base for the wedge colors. You surely have some kind of preference for this list. If you do, please share them so I can update the list.

As to how it looks: Screenshot from 2021-11-11 17-20-08 Or as a donut: Screenshot from 2021-11-11 17-26-41

ghalex commented 2 years ago

Hi, @pvanagtmaal,

Nice to meet you and thanks a lot for contributing to the project. I will take a look at your pull request this weekend and provide feedback. After that, if everything is fine I will add it to the documentation and publish a new version.

Thanks, Alexandru

ghalex commented 2 years ago

I have checked the code and everything looks awesome, good job.