Can I have a Pie chart label on top of the Pie chart and also a question about the key position

Share RGraph:   Share or Like RGraph on Facebook!

« 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 Ananth on 28th September 2017
Hi Richard,

can you please help me with an example of pie chart lable on top of pie instead of outside of chart and keyPosition property example as well i was referring this link www.rgraph.net/canvas/docs/keys-in-charts.html#key-configuration-properties but not sure how to implement this

1. how to set key position
2. how to set chart position



var objData = [16, 46, 38]

  var pieCanvas4 = new RGraph.Pie({
                 id: 'cvs',
                 data: objData,
                 options: {
                     gutterLeft: 1,
                     //gutterRight: 50,
                     //linewidth: 0,
                     //strokestyle: 'rgba(0,0,0,0)',
                     tooltips: ['a', 'b', 'c'],
                     //labels: ['a ' + objData[0], 'b ' + objData[1], 'c' + objData[2]],
                     colors: ['#99B958', '#4E80BB', '#BE4E4C'],
                     variant: 'pie3d',
                     titleXaxis: 'as',
                     radius: 100,
                     //labelsSticksList: true,
                     //labelsSticksColors: ['#cc0', '#0f0', 'black'],
                     key: ['a ' + objData[0] + '%', 'Incidbnts ' + objData[1] + '%', 'c ' + objData[2] + '%'],
                     textSize: 9,
                     radius: 80,
                     shadowOffsety: 5,
                     shadowColor: '#aaa',
                     keyColorShape: 'circle',
                     //keyPositionGraphBoxed: false,
                     keyTextColor: 'black',
                     keyPositionY: 1,
                     keyPositionX: 200,
                     keyTextSize: 7
                     //exploded: [, , 20],
                     //textAccessible: false
                 }
             }).draw();



Thanks
Ananth
Posted by Richard on 28th September 2017
Hi there,

Do you mean that you want something like this:

www.rgraph.net/fiddle/view.html/a-pie-chart-with-ingraph-labelss

As for positioning the key you can use the properties that are shown here:

www.rgraph.net/canvas/docs/keys-in-charts.html

Richard
Posted by Ananth on 28th September 2017
Hi Richard,

thank you! i can see the labels now with the values can we have text appended to those values as well ?

also what are the other option that we have for keyPosition: 'gutter', other than gutters?


Thanks,
Ananth
Posted by Ananth on 28th September 2017
Hi Richard,

please ignore my previous question for lable text i can use this "labelsIngraphSpecific"

can you please help me with the options that we have for keyPosition: 'gutter', other than gutters?


Thanks,
Ananth
Posted by Richard on 29th September 2017
Hi there,


The other option you have there is 'graph'.

Richard
Posted by Ananth on 29th September 2017
Hi Richard,

thank you, regarding labelsIngraph: true if i use chart variant as pie3d labelsIngraph font is unreadable or even that getting changed to 3d etc do we have any option to avoid this for labels for 3d charts?


Thanks,
Ananth
Posted by Richard on 29th September 2017
Hi there,

Perhaps you need to set the textAccessible property to false. Here's an example of a 3D Pie chart when you do:

www.rgraph.net/demos/pie-3d.html

Richard
Posted by Ananth on 29th September 2017
Hi Richard,

thank you! textAccessible: false works with appropriate key properties


Thanks,
Ananth

Add a reply




« Back to message list