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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.