Apply converter to axis label style in WPF Toolkit Chart LineSeries

Nov 17, 2009 at 8:31 PM
Edited Nov 17, 2009 at 8:33 PM

Hello,

I have a chart with a LineSeries that displays currency in the y axis.  I was able to easily format the axis label by using StringFormat and setting that on the AxisLabelStyle property, e.g.

 

        <Style x:Key="VerticalLabelStyle" TargetType="chartingToolkit:AxisLabel">
            <Setter Property="StringFormat" Value="{}{0:C}"/>
        </Style>

...

         <chartingToolkit:LinearAxis Orientation="Y" 
                                     ShowGridLines="False" 
                                     FontFamily="Arial" FontSize="9"
                                     AxisLabelStyle="{StaticResource VerticalLabelStyle}">

This formats the y axis label to show currency in the current user's locale.  However I actually need to format the currency to what is actually being displayed in the chart, which is not necessarily the desktop locale.  I have a converter that does this in other places, but I can't figure out how to use it here as the only way I've found to affect the axis label style is through this StringFormat.

Any clues?