Multi-Axis Charts
In SciChart, it is required that each Axis in a corresponding Axis Collection has a unique identifier. This is a string that can be provided via the Axis.Id property. By default, all axes have a default Axis ID.
For single-axis charts there is no need to set Axis Id. As soon as there is a secondary Axis, you need to start assigning IDs to all Axes in the corresponding Axis Collection.
In such multiple-axis scenarios, some SciChart types such as Renderable Series, Annotations, Chart Modifiers can be associated with a certain Axis. Their API usually exposes XAxisId and YAxisId properties that can be used to associate this type with a specific X or Y Axis.
XAxis on the Top/Bottom
SciChart supports unlimited XAxis on the top or bottom of the chart. To set the alignment of an axis, simply set the AxisBase.AxisAlignment property.
XAxis on the Top/Bottom |
Copy Code
|
---|---|
<s:SciChartSurface> <s:SciChartSurface.YAxis> <s:NumericAxis AxisAlignment="Right" AxisTitle="YAxis"/> </s:SciChartSurface.YAxis> <s:SciChartSurface.XAxes> <s:NumericAxis AxisAlignment="Top" AxisTitle="XAxis 0"/> <s:NumericAxis Id="SecondaryXAxis" AxisAlignment="Bottom" AxisTitle="XAxis 1"/> <s:NumericAxis Id="TeriaryXAxis" AxisAlignment="Bottom" AxisTitle="XAxis 2"/> </s:SciChartSurface.XAxes> </s:SciChartSurface> |
Results in
YAxis on the Left/Right
SciChart supports unlimited YAxis on the left or right of the chart. To set the alignment of an axis, simply set the AxisBase.AxisAlignment property.
YAxis on the Left/Right |
Copy Code
|
---|---|
<s:SciChartSurface> <s:SciChartSurface.XAxis> <s:NumericAxis AxisAlignment="Bottom" AxisTitle="XAxis"/> </s:SciChartSurface.XAxis> <s:SciChartSurface.YAxes> <s:NumericAxis AxisAlignment="Left" AxisTitle="YAxis 0"/> <s:NumericAxis Id="SecondaryYAxis" AxisAlignment="Right" AxisTitle="YAxis 1"/> <s:NumericAxis Id="TeriaryYAxis" AxisAlignment="Right" AxisTitle="YAxis 2"/> </s:SciChartSurface.YAxes> </s:SciChartSurface> |
Results in