Hi,
I have Implimented Pie Chart in my application.
I wanted to change the colors which are applied by default to the chart?
I tried adding <telerik:ChartArea.PaletteBrushes> , The Pie chart displayed as per the colors specified,but the colors was not being applied to the Legends, nor the Legends were being displayed.
Below is my code,
And here is the code behind,
.
I have Implimented Pie Chart in my application.
I wanted to change the colors which are applied by default to the chart?
I tried adding <telerik:ChartArea.PaletteBrushes> , The Pie chart displayed as per the colors specified,but the colors was not being applied to the Legends, nor the Legends were being displayed.
Below is my code,
<
telerik:RadChart
x:Name
=
"pieChartMonthtoDate"
BorderBrush
=
"Transparent"
Background
=
"Transparent"
Grid.Column
=
"0"
Width
=
"450"
Height
=
"300"
>
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:PieSeriesDefinition
ItemToolTipFormat
=
"#%{P2}"
ShowItemToolTips
=
"True"
>
<
telerik:PieSeriesDefinition.InteractivitySettings
>
<
telerik:InteractivitySettings
HoverScope
=
"Item"
SelectionScope
=
"Item"
SelectionMode
=
"Single"
/>
</
telerik:PieSeriesDefinition.InteractivitySettings
>
</
telerik:PieSeriesDefinition
>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SeriesMapping.ItemMappings
>
<
telerik:ItemMapping
FieldName
=
"Count"
DataPointMember
=
"YValue"
/>
<
telerik:ItemMapping
FieldName
=
"ReportType"
DataPointMember
=
"LegendLabel"
/>
</
telerik:SeriesMapping.ItemMappings
>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
</
telerik:RadChart
>
And here is the code behind,
Private
Sub
LoadReportActivityMonthCompleted(
ByVal
invoke
As
LoadOperation(Of AuditReportsViewedEntities))
Try
pieChartMonthtoDate.DefaultView.ChartLegend.Style =
Me
.CustomLegendStyle
pieChartMonthtoDate.DefaultView.ChartLegend.LegendItemStyle =
Me
.CustomLegendItemStyle
pieChartMonthtoDate.ItemsSource = invoke.Entities
Catch
ex
As
Exception
End
Try
End
Sub