This question is locked. New answers and comments are not allowed.
I am newbie to Telerik controls. Trying to create a pie chart with lables, but not able to find a complete example in Telerik help files.
xaml
And I am setting the value in C#:
The pie chart displays fine with %-tile lable for each item. But I like to use custom lable for them. How do I do it? Also, Is there a way to display the lables on the side (with a color icon and corresponding text), not on the chart itself?
xaml
<
chart:RadPieChart
x:Name
=
"gPie"
Margin
=
"27,95,143,276"
Grid.Row
=
"1"
DataContext
=
"{Binding}"
>
<
chart:PieSeries
ShowLabels
=
"True"
DataContext
=
"{Binding}"
>
<
chart:PieSeries.SliceStyles
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"Magenta"
/>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"LimeGreen"
/>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"DarkOrange"
/>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"Purple"
/>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"Green"
/>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"Red"
/>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"Blue"
/>
</
Style
>
</
chart:PieSeries.SliceStyles
>
<!--<
chart:PieSeries.LabelTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding}"
FontSize
=
"14"
Foreground
=
"{StaticResource PhoneBackgroundBrush}"
FontWeight
=
"Bold"
/>
</
DataTemplate
>
</
chart:PieSeries.LabelTemplate
>-->
</
chart:PieSeries
>
</
chart:RadPieChart
>
And I am setting the value in C#:
this.gPie.Series[0].ItemsSource = new double[] { iFajr, iDohr, iAsr, iMagrib, iEsha, iFasting, iHajj };
The pie chart displays fine with %-tile lable for each item. But I like to use custom lable for them. How do I do it? Also, Is there a way to display the lables on the side (with a color icon and corresponding text), not on the chart itself?