i want to add a text message inside my doughnut pie chart. To be more specific i want something like this:
I came across the same issue here in stack overflow by they use chart js in jquery and since i'm new to javascript i got confused. This is how i define my pie chart:
<Doughnut
data={sectorsData}
width={250}
height={250}
options={{
legend: {
display: false
},
maintainAspectRatio: false,
responsive: true,
cutoutPercentage: 60
}}
/>
My example uses the property
text
on the data to specify the inner text:You'll have to scroll down a bit to see in when running the CodeSnippet due to some weird console error.
It works properly in CodePen though, where I wrote it: http://codepen.io/anon/pen/OpdBOq?editors=1010