ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Set the Z axis scale that was controlled by my setting data not the default value.
Posted by Set the Z axis scale that was controlled by my setting data not on Nov-25-2011 13:38
Now I use the c.zAxis().setLinearScale(0, 40, 10) method to control the  range of Z axis.
Every Scale is the same size(equal to 10).
Now i want to set the Z axis scale that was controlled by my setting data not the default
value.

For example.
The range is from 0 to 100
Now i want to divide it to 5, like this
0-10,10-30,30-60,60-70,70-100
whether it can be done like that.

  Re: Set the Z axis scale that was controlled by my setting data not the default value.
Posted by Peter Kwan on Nov-26-2011 01:03
Hi Jerry,

You can use Axis.addLabel to add custom ticks to the axis. For example:

//position of the ticks
double[] ticks = {10, 30, 60, 70};

c.zAxis().setLinearScale(0, 100, 100);
for (int i = 0; i < ticks.length; ++i) {
    c.zAxis().addLabel(ticks[i], "" + ticks[i]);
    c.colorAxis().addLabel(ticks[i], "" + ticks[i]);
}

Hope this can help.

Regards
Peter