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


I want to write the X axis vertically, as shown in the following image.
How should I do it?

  • You must to post comments

Hi there,

It is possible to rotate the XAxis labels in SciChart using this technique:

Axis Styling – Templating Axis Labels Documentation

Axis labels can be rotated if you style them via the AxisCore.TickLabelStyle property.

      <Style x:Key="RotatedTickLabelStyle" TargetType="s:DefaultTickLabel">
         <Setter Property="Foreground" Value="Orange"></Setter>
         <Setter Property="FontSize" Value="16"/>
         <Setter Property="FontFamily" Value="Segoe UI"/>
         <Setter Property="LayoutTransform">
               <RotateTransform Angle="90"/>
       <!-- Optionally override ControlTemplate for the label -->
       <Setter Property="Template">
            <ControlTemplate TargetType="labelProviders:DefaultTickLabel">
               <ContentControl Content="{Binding}"
                  ContentTemplate="{TemplateBinding ContentTemplate}"
                  Foreground="{TemplateBinding Foreground}" IsTabStop="False" />

   <!--  Create the chart surface  -->
   <!-- where xmlns:s="" -->

   <!--  Create XAxis  -->
      <s:NumericAxis AxisTitle="Styled XAxis" TextFormatting="0.000" TickLabelStyle="{StaticResource RotatedTickLabelStyle}"/>

   <!--  Create YAxis  -->
      <s:NumericAxis AxisTitle="Primary YAxis" AxisAlignment="Left"/>
      <s:NumericAxis Id="SecondaryYAxisId" AxisTitle="Secondary YAxis" AxisAlignment="Right" />


This will result in rotated axis labels.

enter image description here

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.