Glossary Item Box

.netCHARTING v3.1 Documentation Send comments on this topic.

Element Layout Control Advanced

Z-Axis Effect

Using multiple axes with series can yield some interesting results you may not be aware of. We'll explore a situation that simulates a z axis. A basic z axis can be simulated using

[C#]

Chart.XAxis.ClusterColumns = false;

[Visual Basic]

Chart.XAxis.ClusterColumns = false

This may show a chart that looks like this:

 

Using X Axes

This works well however if we wanted a z axis with two steps and two clustered series on each step we will have to use two X axes. This time we will also omit setting the cluster columns property to false.

[C#]

Axis a2 = new Axis();
mySC[0].XAxis = a2;
mySC[1].XAxis = a2;
a2.Clear();

[Visual Basic]

Axis a2 = new Axis();
mySC[0].XAxis = a2;
mySC[1].XAxis = a2;
a2.Clear();

We "Clear()" the second axis so that only the original one is visible.
 
Tip: This method also allows overlapping columns
in 2D mode which is useful in Gantt charts:
 

 
Using Y Axes
Y axes will typically not affect the z axis. For example using the following code where we give two of the four series a new y axis and set the scale to stacked:
 
Axis a2 = new Axis();
mySC[0].YAxis = a2;
mySC[1].YAxis = a2;
a2.Scale = Scale.Stacked;
 
Will yield this result:
 

 

Notice that the new y axis is stacked but still the main x axis manages the clustered - unclustered layout. Therefore if we wanted to uncluster the columns we could have multiple z axis steps and some may be stacked while other wont.

[C#]

Chart.XAxis.ClusterColumns = false;

[Visual Basic]

Chart.XAxis.ClusterColumns = false

 

Sample: features/AxisDualScales.aspx

 


2002 - 2005 Webavail Productions Inc. & Corporate Web Solutions Ltd.. All Rights Reserved.