Pre loader

Horizontal Y Axis Title

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

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.

Try SciChart Today

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

Start TrialCase Studies