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

Message ListMessage List     Post MessagePost Message

  Start axis scale from top
Posted by Rs on Feb-16-2011 05:22
How can set yaxis to start scale from top to bottom?

  Re: Start axis scale from top
Posted by Peter Kwan on Feb-16-2011 11:43
Hi Rs,

You may use Axis.setReverse. For example, in VB/VBScript:

Call c.yAxis().setReverse()

Hope this can help.

Regards
Peter Kwan

  Re: Start axis scale from top
Posted by Rs on Feb-18-2011 23:34
This does but it also makes bar charts to start from top and not from bottom.
I want to only reverse values on y -axis and keep chart same.

  Re: Start axis scale from top
Posted by Peter Kwan on Feb-19-2011 09:49
Hi Rs,

By default, the bar starts from zero (or the direction that contains zero), and "grow" to the data value. If your axis is reversed, and your data are positive, then the zero direction is at the top, and the bar will start from the top. If your data are negative, the bar will start from the bottom.

If you want the bar to start from the bottom (from the direction of positive infinity), you may use BarLayer.setBaseLine. For example (in VB/VBScript):

Set layer = c.addBarLayer(data)
Call layer.setBaseLine(1E100)

Hope this can help.

Regards
Peter Kwan