Pre loader

How do I right-justify the numbers on the y-axis?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies