Trying to get a Horizontal Y Axis Title. Why doesn’t this work?
<Style x:Key="AxisTitleStyle" TargetType="s:AxisTitle">
<Setter Property="Orientation" Value="Horizontal" />
</Style>
...
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="Axis Title" TitleStyle="{StaticResource AxisTitleStyle}"/>
</s:SciChartSurface.YAxis>
Title is still Vertical.
- Mike A asked 8 years ago
- You must login to post comments
Hi Mike,
To rotate an Axis Title to horizontal, you will need to follow the steps from the KB Article Styling Axis Labels, Axis Titles, Rotating Axis Labels to template the AxisTitle, and include a LayoutTransform with Angle=90, like this:
<Style x:Key="AxisTitleStyle" TargetType="s:AxisTitle">
<Setter Property="LayoutTransform">
<Setter.Value>
<RotateTransform Angle="90"/>
</Setter.Value>
</Setter>
</Style>
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="Axis Title" TitleStyle="{StaticResource AxisTitleStyle}"/>
</s:SciChartSurface.YAxis>
Let me know if this helps,
Best regards,
Andrew
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Please login first to submit.