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
- Neville Bonwit asked 9 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 9 years ago
- last edited 9 years ago
- You must login to post comments
Please login first to submit.