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

Message ListMessage List     Post MessagePost Message

  Set settings for "minimal value" and "maximal value"
Posted by Norman on Apr-27-2011 21:33
Hey,

first, thanks for that awesome product and this forum here. Its documentation is really good and Im very happy with it.

But now I got to a question that I couldnt be found answered in the manual. Im using ChartDirector 5.0 Perl Version...


I usually use autoscaling, but now, at a simple line chart, it doesnt do it as I want, though the lowest value is about 70, the chart goes way down to 0.

Ive implemented a way to "look after" the lowest value, and it does it correctly.

How can I tell chartdirector to start the chart only above value, lets say, 70?

Is there any way?






Thanks in advance!

  Re: Set settings for "minimal value" and "maximal value"
Posted by Peter Kwan on Apr-27-2011 23:45
Hi Norman,

By default, in auto-scaling, if the data fluctuation is larger than 20% of the maximum data value, ChartDirector will set the axis scale to start from 0. This is called "zero affinity" (which means the zero point is given a preference when choosing the axis cale), and is configurable using Axis.setAutoScale.

For example, if the data are from 99.006 to 99.053, ChartDirector may choose the axis scale 99.00 to 99.06. However, if the data are from 31 to 102, ChartDirector may choose 0 to 110.

To disable "zero affinity", you may use:

$c->yAxis()->setAutoScale(0.05, 0.05, 0);

The above will ask ChartDirector to not to given any preference to the zero point in choosing the axis scale.

However, if you prefer to set the lower-limit yourself, you may use:

$c->yAxis()->setLinearScale(70, $perlchartdir::NoValue);

The above will tell ChartDirector to try to use 70 as the lower limit, and automatically determine the upper limit. ChartDirector may or may not actually use the given lower limit due to axis rounding. For example, if the given lower limit is 70.2357083217, and ChartDirector determines the upper limit to be 100, it may move the lower limit to 70 instead. See "Axis.setRounding" on how to configure this.

Hope this can help.

Regards
Peter Kwan

  Re: Set settings for "minimal value" and "maximal value"
Posted by Norman on Apr-28-2011 13:58
That helped me very much, thanks!