SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Answered
0
0

Hi

I have an numeric Y axis where I want the labels to be right aligned (see attached image).

I tried to change the TickLabelStyle in different ways but with no luck. Can you help me with this basic request? 🙂

/Flemming

Version
5.1.1
Images
  • You must to post comments
Best Answer
0
0

Hi Flemming

This is demonstrated in our example ‘Xaml Styling a WPF Chart

In this example we set a style on the Left Axis labels and set property HorizontalAnchorPoint to right align the labels

    <Style x:Key="LeftAxisLabelStyle" TargetType="s:DefaultTickLabel">
        <Setter Property="Foreground" Value="Green"/>
        <Setter Property="FontSize" Value="15"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <!--  Align labels to the left side  -->
        <Setter Property="HorizontalAnchorPoint" Value="Right"/>
    </Style>

    <s:SciChartSurface.YAxes>
        <s:NumericAxis AxisAlignment="Left" AxisTitle="Axis Left Title" TickLabelStyle="{StaticResource LeftAxisLabelStyle}">
    </s:SciChartSurface.YAxes>

Let me know if this helps,

Best regards,
Andrew

  • You must to post comments
0
0

Thanks – it works.

/Flemming

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+