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

Color of axis labels

1 Answer 103 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Marek
Top achievements
Rank 1
Marek asked on 29 Mar 2009, 07:40 PM
Hello,

I need to change foreground color of axis value labels. I tried to set style of AxisX(Y)Label2D, but with no effect.

<

 

Style TargetType="{x:Type telerik:AxisXLabel2D}">

 

 

 

    <Setter Property="Foreground" Value="Red" />

 

 

 

</Style>

Thanks for your reply!

Marek

 

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 30 Mar 2009, 04:36 PM
Hi Marek,

It seems there is a glitch which prevents this approach from working correctly. I have notified our developers of it and the fix has been scheduled for the service pack release, expected within two weeks. For the time being you can use the following workaround:

<Grid.Resources> 
            <telerik:LabelFormatConverter x:Key="labelFormatConverter" /> 
            <Style TargetType="telerik:AxisXLabel2D" > 
                <Setter Property="Foreground" Value="Red" /> 
                <Setter Property="Template"
                    <Setter.Value> 
                        <ControlTemplate TargetType="telerik:AxisXLabel2D"
                            <TextBlock Text="{Binding Converter={StaticResource labelFormatConverter}}" /> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </Grid.Resources> 
        <telerik:RadChart x:Name="RadChart1" > 
        </telerik:RadChart> 

Your Telerik points have been updated.

Best regards,
Ves
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Chart
Asked by
Marek
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or