How do I add a country label in a Pie chart?

Share RGraph:  

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Amit on 12th September 2017
how do I add country label in pie chart below. For each country I am getting % and I want to show countries on right top and the percentage like below.

www.rgraph.net/fiddle/view.html/a-pie-chart-with-ingraph-labelss
Posted by Richard on 12th September 2017
Hi there,

It's showing you in the source code there - you use the labelsIngraph properties. Note though that RGraph doesn't do any size calculations for you where these labels are concerned - so they will still be displayed even if the segment is on the small side. Using a background color to the labels might help this though.

Richard
Posted by Amit on 12th September 2017
I found it!
   labels: ['Richard','Robert','Rico','Ray','Raife','Ryan','Roland'],
Posted by Amit on 12th September 2017
How do I make
www.rgraph.net/demos/svg-pie-csv.html like this with country, count shown inside without tooltip? Alpha only supports svg rgraph charts.
Posted by Richard on 13th September 2017
Hi there,
Only the canvas Pie chart supports ingraph labels currently I'm afraid - I can add it to the SVG Pie chart though.

Richard
Posted by Richard on 14th September 2017
Hi there,

Ok, I've added ingraph labels to the SVG Pie chart - and you can try it out if you wish by using todays beta:

www.rgraph.net/download#beta

The property names are:

labelsIngraph
labelsIngraphHalign
labelsIngraphValign
labelsIngraphFont
labelsIngraphSize
labelsIngraphItalic
labelsIngraphBold
labelsIngraphColor
labelsIngraphRadiusPos
labelsIngraphSpecific
labelsIngraphUnitsPre
labelsIngraphUnitsPost
labelsIngraphPoint
labelsIngraphThousand
labelsIngraphBackground
labelsIngraphFormatter
labelsIngraphDecimals


Richard

Add a reply




« Back to message list