We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Display Text on Pie Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

132311 Aug 25,2017 10:01 AM UTC Aug 29,2017 05:44 PM UTC WinForms 3
loading
Tags: Chart
Caraka Wedhatama
Asked On August 25, 2017 10:01 AM UTC

Hi, i have a sample code of pie chart like this

- My sample code : https://prnt.sc/gctyvn
- The pie chart : https://prnt.sc/gctzge

What i want to asks are :
1. Is it possible to show the qualitative value inside the pie ? How exactly it is ?
2. How can i display the categorical value ?
3. How can i make the line -that connected to display text- longer ? It seems too short for me, sorry.
the line that i mention above is like this one : https://prnt.sc/gcue6e

Thank you :)


Saravana Kumar Kanagavel [Syncfusion]
Replied On August 28, 2017 07:16 AM UTC

Hi Caraka, 
 
Thanks for contacting Syncfusion Support. 
We have analyzed your queries and please find the below responses. 
 
Query 1: Is it possible to show the qualitative value inside the pie ? How exactly it is ? 
If you wish to display the text inside the pie segment, then please follow the below code. 
 
[C#] 
series.ConfigItems.PieItem.LabelStyle = ChartAccumulationLabelStyle.Inside; 
 
 
In the above code, we have specified the value as inside to the ‘LabelStyle’ property and please find the output of below. 
 
 
                                                                    
Query 2:  How can i display the categorical value ? 
 
You can display the category value either inside or outside of pie series by using ‘TextFormat’ property. Please follow the below code. 
 
[C#] 
      for (int i = 0; i < 9; i++) 
            { 
               series.Styles[i].TextFormat = series.Points[i].Category.ToString() + ":{0}"; 
           } 
 

Please find the output of the below 
 
Query 3: How can i make the line -that connected to display text- longer ? 
 
You can achieve this requirement by using ‘TextOffset’ property. 
 
[C#] 
series.ConfigItems.PieItem.LabelStyle = ChartAccumulationLabelStyle.Outside; 
series.Style.TextOffset = 50; 
 
 
Please find the output of the below 
 
 
And we have prepared a sample for your reference and attached in the below location. 
 
 Please let us know if you have any concern.

Regards,
Saravana Kumar K 
 

 
  
  


Caraka Wedhatama
Replied On August 28, 2017 07:32 AM UTC

Dear Saravana Kumar Kanagavel,

Thank's for the answer. That helped me a lot.

But if it possible, can I separate qualitative and categorical text ? The qualitative text is inside the pie, and categorical text is outside the pie.


Thank you :)


Dharanidharan Dharmasivam [Syncfusion]
Replied On August 29, 2017 05:44 PM UTC

Hi Caraka, 
 
Thanks for the update. 
 
We have analyzed your query. As of now you can able to place the text either inside or outside the pie chart and not able to place the text inside and outside the pie chart in an instance. So, kindly use the below code snippet to place the text either inside or outside of pie chart. 
 
Windows Forms: 
 
series.ConfigItems.PieItem.LabelStyle = ChartAccumulationLabelStyle.Inside;  
 
 
Kindly revrt us, if you have any concerns. 
 
Thanks, 
Dharani. 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;