WPF Charting Documentation - SciChart WPF Charts SDK v5.x
Axis Alignment - Rotating a Chart Vertically

Rotating a Chart (Vertical Oriented Chart)

SciChart supports unlimited, multiple XAxis on the Left/Right and unlimited, multiple YAxis on the Top/Bottom of a chart (rotated charts). To rotate a chart, simply set XAxis.AxisAlignment to Left or Right, and YAxis.AxisAlignment to Top or Bottom. SciChart takes care of the rest.

Rotating a Chart (Vertical Oriented Chart)
Copy Code
<!-- Declare a chart with two YAxis at the top.  -->
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/SciChart" -->
<s:SciChartSurface Name="sciChartLeft" Grid.Column="0" Margin="0 0 10 0" s:HorizontalGroupHelper.HorizontalChartGroup="MyHorizontalGroup">

       <!--  Define the XAxis for this chart on the Left -->
       <s:SciChartSurface.XAxis>
             <s:NumericAxis AxisAlignment="Left" AxisTitle="X-Axis" DrawMajorBands="True"/>
       </s:SciChartSurface.XAxis>

       <!-- Define multiple YAxis on the top -->
       <s:SciChartSurface.YAxes>
             <s:NumericAxis AxisAlignment="Top" AxisTitle="Gray Line"
                            BorderBrush="DarkGray" BorderThickness="0,0,0,1"
                                     Id="Top1" TickTextBrush="DarkGray"/>
             <s:NumericAxis AxisAlignment="Top" AxisTitle="Brown Line"
                            BorderBrush="Brown" BorderThickness="0,0,0,1"
                                     Id="Top2" TickTextBrush="Brown"/>
       </s:SciChartSurface.YAxes>

</s:SciChartSurface>

Mixed Charts, charts with XAxis, YAxis on the left/right as well as Top/Bottom

SciChart allows any combination of XAxis, YAxis alignment to create charts with mixed horizontal and vertical charts.

In the following example we declare one series (Orange) with XAxis on the Left / YAxis on the Top, and a second series (Blue) with XAxis on the bottom / YAxis on the right.

Mixed Charts, charts with XAxis, YAxis on the left/right as well as Top/Bottom
Copy Code
<s:SciChartSurface>
   <s:SciChartSurface.XAxes>
      <s:NumericAxis Id="X1" AxisAlignment="Left" AxisTitle="Left XAxis"
                              TickTextBrush="Orange"/>
      <s:NumericAxis Id="X2" AxisAlignment="Bottom" AxisTitle="Bottom XAxis"
                              TickTextBrush="SteelBlue"/>
   </s:SciChartSurface.XAxes>

   <s:SciChartSurface.YAxes>
      <s:NumericAxis Id="Y1" AxisAlignment="Top" AxisTitle="Top YAxis"
                              TickTextBrush="Orange"/>
      <s:NumericAxis Id="Y2" AxisAlignment="Right" AxisTitle="Right YAxis"
                             TickTextBrush="SteelBlue"/>
   </s:SciChartSurface.YAxes>
</s:SciChartSurface>

 

See Also

 

 


SCICHART ® is a Registered Trademark in the UK, US and EEC. Copyright SciChart Ltd 2011-2018.

Email us to give feedback!