Change RadChartesianChart label color

2 posts, 0 answers
  1. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 11 Dec 2012 Link to this post

    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
  2. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 13 Dec 2012 Link to this post

    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.

  3. DevCraft banner
Back to Top