SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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.
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
Please login first to submit.