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

Message ListMessage List     Post MessagePost Message

  xaxis Label Setboder
Posted by Steven on Mar-14-2016 15:15
Attachments:
How to set boder in xaxis in the 'test2.png'?
'test.png' is my code now
It is Ganntt chart
test2.png
test.png

  Re: xaxis Label Setboder
Posted by Steven on Mar-14-2016 15:16
I hope to set boder like 'test2.png'

  Re: xaxis Label Setboder
Posted by Peter Kwan on Mar-15-2016 05:06
Hi Steven,

You can use the "ticks" as the border. The Axis.addLabel can be used to specify the location of the border. For example:


Dim startTime As Date
Dim endTime As Date
startTime = DateSerial(2016, 1, 1)
endTime = DateSerial(2016, 2, 29)

'Add another axis just for the border
Dim borderAxis
Set borderAxis = c.addAxis(cd.Top, 18)
Call borderAxis.setDateScale(startTime, endTime, cd.NoValue)
Call borderAxis.setColors(&H888888)
Call borderAxis.setTickLength(0, 15)

'Put the ticks at the first day of a month
Dim tickPos As Date
tickPos = DateSerial(Year(startTime), Month(startTime), 1)
Do While tickPos <= endTime
     If tickPos >= startTime Then Call borderAxis.addLabel(tickPos, "-")
     tickPos = DateAdd("m", 1, tickPos)
Loop


Hope this can help.

Regards
Peter Kwan