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

converter applied to x-axis labels

1 Answer 33 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Fabio
Top achievements
Rank 1
Fabio asked on 07 Nov 2013, 11:00 AM
I have a categorical chart where X values are enum.
By default chart shows as x-axis labels the name of enum value.

Is it possible to insert a converter so that the label is automatically converted to a custom (localized) string?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 12 Nov 2013, 08:45 AM
Hi Fabio,

You can use a custom LabelTemplate in order to add a converter for your axis labels. Here is how:
<telerik:CategoricalAxis.LabelTemplate>
    <DataTemplate>
        <TextBlock Text="{Binding Converter={StaticResource myConverter}}" />
    </DataTemplate>
</telerik:CategoricalAxis.LabelTemplate>

Hope this helps!

Regards,
Yavor
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Chart
Asked by
Fabio
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or