reactjs / react-chartjs

common react charting components using chart.js
MIT License
2.93k stars 299 forks source link

DoughnutWithTextInside #75

Open lemonCMS opened 8 years ago

lemonCMS commented 8 years ago

Hi,

I have created the DoughnutWithTextInside this will set centered text within the doughnut. Right now it set a percentage, this is what i needed for my project.

Perhaps you would find this interesting into implementing something like this into your package. You can tak a look at https://github.com/lemonCMS/react-chartjs

Kind Regards, Raymond

Malachi-M commented 8 years ago

Hey great branch! One of the issues I ran into when implementing the DoughnutWithTextInside was that the fontSize is calculated by a hard coded factor. It would be great if the fontSize could be exposed in the options object.

checkhavoc commented 8 years ago

Hi @lemonCMS,

I need a Doughnut chart with text inside as well, but instead of creating an additional fork or pull request, do you think you can submit your changes as a pull request with the fontSize that @Malachi-M mentioned?

Hopefully then, the pull request can be approved afterwards :)

Malachi-M commented 8 years ago

Hello @checkhavoc, I have created a pull request with the added labelScale option. It is available here. I hope it helps! Malachi

sunnybogawat commented 8 years ago

How to use this feature along with reactJS component. This is not listed in the readme file. Could you please lets us know how I can set dynamic text inside doughnut graph

zenonn37 commented 8 years ago

1+