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

Message ListMessage List     Post MessagePost Message

  xAxis to be INTEGER numbers only
Posted by icm63 on Mar-28-2019 09:57
Attachments:
I would like the xAxis and the yAxis to be integers only.

How can make this happen.

My code for the attached xAxis chart attached

note: calculated range is xAxisMin and xAxisMax etc

        mainXYChart1.xAxis().setLinearScale(xAxisMin, xAxisMax)
        mainXYChart1.yAxis().setLinearScale(yAxisMin, yAxisMax)

        mainXYChart1.xAxis().setTickDensity(20)
        mainXYChart1.xAxis().setTickLength(5)
        mainXYChart1.yAxis().setTickDensity(20)
        mainXYChart1.yAxis().setTickLength(5)
SH_0009.png

  Re: xAxis to be INTEGER numbers only
Posted by Peter Kwan on Mar-28-2019 14:48
Hi icm63,

You may use Axis.setMinTickInc.

For example:

' Tick increment must be at least 1
mainXYChart1.xAxis().setMinTickInc(1)
mainXYChart1.yAxis().setMinTickInc(1)

Hope this can help.

Regards
Peter Kwan