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

Change RadChartesianChart label color

1 Answer 59 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 11 Dec 2012, 03:19 PM
Hello Telerik,
I'm trying to change the label color of a RadChartesianChart,
I've tried using

<Style x:Key="CustomAxis" TargetType="telerik:Axis">
         <!--<Setter Property="TitleTemplate">
             <Setter.Value>
                 <DataTemplate>
                     <TextBlock Text="AAA" Foreground="Orange" />
                 </DataTemplate>
             </Setter.Value>
         </Setter>-->
 
             <Setter Property="LabelStyle">
                 <Setter.Value>
                     <Style TargetType="TextBlock">
                         <Setter Property="Margin" Value="4"/>
                         <Setter Property="Foreground" Value="Red" />
                     </Style>
                 </Setter.Value>
             </Setter>
         </Style>

but I got a catastrophic failure..what can I do?
I'm using last version of telerik usercontrols..
Thanks

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 13 Dec 2012, 09:06 AM
Hi Paolo,

 I've already answered you in the support thread you opened for the same topic. Please avoid duplicate threads, so it is easier for both sides to follow the conversation. I'm copying the answer here:
I couldn't find where the CustomAxis style is referenced in the code snippet you provided. Setting it to the LinearAxis for example via StaticResource works as expected to me - the Foreground is correctly applied.

All the best,
Evgenia
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Michele
Top achievements
Rank 2
Answers by
Evgenia
Telerik team
Share this question
or