tmpTime就是随便一个时间,用来计算坐标分割.当然,你也可以使用别的方法.比如使用DateTimeStep来定义时间间隔.刚才忘记说啦,把横坐标的类型设置为TDateTime.
下面是TeaChart的帮助中关于DateTimeStep的定义.
type TDateTimeStep = (dtOneMicroSecond, dtOneMillisecond, dtOneSecond, dtFiveSeconds, dtTenSeconds, dtFifteenSeconds, dtThirtySeconds, dtOneMinute, dtFiveMinutes, dtTenMinutes, dtFifteenMinutes, dtThirtyMinutes, dtOneHour, dtTwoHours, dtSixHours, dtTwelveHours, dtOneDay, dtTwoDays, dtThreeDays, dtOneWeek, dtHalfMonth, dtOneMonth, dtTwoMonths, dtThreeMonths, dtFourMonths, dtSixMonths, dtOneYear, dtNone);
Unit
TeeProcs
Description
TDateTimeStep is a set of constants used to specify a date time increment.
用于设置时间增量的常数集合
Example:
Chart1.BottomAxis.Increment := DateTimeStep[ dtTwoDays ];//以两天为时间增量
This array is initialized internally at CHART unit.
Example:
DateTimeStep[ dtFifteenMinutes ] := EncodeTime( 0, 15, 0) ;
DateTimeStep[ dtThreeDays ] := 3 ;