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

1
0

Hello,

How do I right-justify the numbers on the y-axis? The y-axis is on the left side of my chart.

Thanks,
Neville

  • You must to post comments
1
0

Hi Neville,

It is possible to change the justification (and other properties) of text as follows:

We have a KB article over here called Styling Axis Labels, Axis Titles, Rotating Axis Labels. This links to our Xaml Styling demo in Silverlight which implements some of the styling applied.

It’s possible to style an axis label to be right justified like so:

<Style x:Key="LeftAxisLabelStyle" TargetType="s:DefaultTickLabel">
    <Setter Property="Foreground" Value="Green"/>
    <Setter Property="FontSize" Value="15"/>
    <!-- Align labels to the left side by using the AnchorPoint (docking point) on the right -->
    <Setter Property="HorizontalAnchorPoint" Value="Right"/>
</Style>
         
<NumericAxis TickLabelStyle="{StaticResource AxisLabelStyle}"/}"/>

If you set the HorizontalAnchorPoint property as part of an AxisLabelStyle, it will change the justification of the text

I hope this helps!

Best regards,
Andrew

Images
  • You must to post comments
0
0

Thanks! It worked!
-Neville

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.