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

0
0

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.

  • You must to post comments
0
0

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

  • You must to post comments
0
0

Yep, that worked, thanks.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.