This question is locked. New answers and comments are not allowed.
Hi everyone,
I was able to change the color of the slices in my piechart using a style.
The colors of this pie have to come from the database and I could do this by using Fill="{Binding DataItem.Kleur}"
My question is now how I can change the color of my LegendItems as well. And this by using a style, because when i use stylespalette to change the colors I can't get thos colors from my database..
Anyone can help me plz ?
Kind regards,
Gertjan
I was able to change the color of the slices in my piechart using a style.
The colors of this pie have to come from the database and I could do this by using Fill="{Binding DataItem.Kleur}"
| <Style x:Key="CustomStyle" TargetType="Telerik_Windows_Controls_Charting:Doughnut"> |
| <Setter Property="Template" > |
| <Setter.Value> |
| <ControlTemplate TargetType="Telerik_Windows_Controls_Charting:Doughnut"> |
| <Canvas> |
| <Ellipse Clip="{TemplateBinding FigurePath}" |
| Width="{TemplateBinding ItemActualWidth}" |
| Height="{TemplateBinding ItemActualHeight}" |
| StrokeThickness="0" |
| Fill="{Binding DataItem.Kleur}" /> |
| <Path x:Name="PART_DefiningGeometry" |
| Data="{TemplateBinding FigurePath2}" |
| Fill="Transparent" |
| Style="{TemplateBinding ItemStyle}" /> |
| <Ellipse Clip="{TemplateBinding FigurePath3}" |
| Fill="{StaticResource DoughnutMaskBrush}" |
| Width="{TemplateBinding ItemActualWidth}" |
| Height="{TemplateBinding ItemActualHeight}"/> |
| <Canvas.RenderTransform> |
| <ScaleTransform x:Name="PART_AnimationTransform" ScaleX="0" ScaleY="0" /> |
| </Canvas.RenderTransform> |
| </Canvas> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter> |
| </Style> |
My question is now how I can change the color of my LegendItems as well. And this by using a style, because when i use stylespalette to change the colors I can't get thos colors from my database..
Anyone can help me plz ?
Kind regards,
Gertjan