rao Posted April 8, 2008 Report Share Posted April 8, 2008 Hi, I want to display the legend data in side the pie chart. How to do ? Thanks & Regards Rao Link to comment Share on other sites More sharing options...
maximop Posted April 8, 2008 Report Share Posted April 8, 2008 In order to show a label inside a pie slice, you need to enable the point labels for that slice and set the point labels format with one of the pre-defined variable settings; please refer to the ChartFX documentation for more information about this property. chart1.Points[0, 0].PointLabels.Format = "%L"; chart1.Points[0, 0].PointLabels.Visible = true;In addition, you can set the Text property of the particular point you want to show the point label for, and the %L of the point labels format will show this value. chart1.Points[0, 0].Text = "Slice 1"; Link to comment Share on other sites More sharing options...
rao Posted April 11, 2008 Author Report Share Posted April 11, 2008 Hi All, Ok i have palced the Text in side pie chart. i want to diaplay the both Text and % , both in side the pie chart. like Slice1 30%, Slice2 50% . how to do that one. Thanks & Regards Rao Link to comment Share on other sites More sharing options...
maximop Posted April 11, 2008 Report Share Posted April 11, 2008 As I mentioned before, you can set the Text property of each individual pie slice and then use the %L variable setting of the PointLabels.Format property to show those values; in addition, you can use the %p variable setting to show the percentage that this pie slice represents. You can do as follows: chart1.AllSeries.PointLabels.Visible = true; chart1.Points[0, 0].Text = "Slice 1";chart1.Points[0, 1].Text = "Slice 2"; chart1.Points[0, 2].Text = "Slice 3";chart1.Points[0, 0].PointLabels.Format = "%L" + " is %p%%"; chart1.Points[0, 1].PointLabels.Format = "%L" + " is %p%%"; chart1.Points[0, 2].PointLabels.Format = "%L" + " is %p%%";For more information about these variable settings, please refer to the Format property of the PointLabelAttributes class in the Samples & Resource Center (Documentation installed with the product). X-Axis labels.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.