Having trouble getting help?
Contact Support
Contact Support
Adding duplicate axis in SfChart
29 Apr 20221 minute to read
Duplicate axis can be added in the SfChart
using the chart Axes
collection property. The axis added in the Axes
collection will be aligned to the horizontal position by default. The axis position can be changed using the IsVertical
bool property of ChartAxis
. When the IsVertical
property is set true, the axis will be placed vertically and vice versa.
The following code sample demonstrates this.
<chart:SfChart>
...
<chart:SfChart.Axes>
<chart:NumericalAxis Minimum="0"
Maximum="70"
IsVertical="True"
OpposedPosition="True" />
</chart:SfChart.Axes>
</chart:SfChart>
SfChart chart = new SfChart();
. . .
chart.Axes.Add(new NumericalAxis()
{
Minimum = 0,
Maximum = 70,
IsVertical = true,
OpposedPosition = true
});
NOTE