This is a migrated thread and some comments may be shown as answers.

Radchart

2 Answers 44 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Bhakti
Top achievements
Rank 1
Bhakti asked on 31 Jan 2012, 05:15 PM
Have the complete application with Microsoft theme. The Radchart legend forecolor needs to be same color as needed. It shows Black right now. How do I change the legend radchart forecolor or keys?
The Legend Items are created dynamically. Pic of what needs changed color attached.

2 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Milev
Telerik team
answered on 03 Feb 2012, 09:49 AM
Hi,

You can do this by applying a legend item style:
RadChart1.DefaultView.ChartLegend.Foreground = new SolidColorBrush(Colors.Red);
RadChart1.DefaultView.ChartLegend.LegendItemStyle = this.Resources["legendItemStyle"] as Style;

<UserControl.Resources>
    <Style x:Key="legendItemStyle" TargetType="telerik:ChartLegendItem" >
        <Style.Setters>
            <Setter Property="Foreground" Value="Red" />
        </Style.Setters>
    </Style>
</UserControl.Resources>
Greetings,
Vladimir Milev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Bhakti
Top achievements
Rank 1
answered on 03 Feb 2012, 05:41 PM
thanks this worked for me. appreciate your help.
Tags
Chart
Asked by
Bhakti
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Bhakti
Top achievements
Rank 1
Share this question
or