如何控制dbchart坐标轴日期的显示颜色? (200分)

  • 主题发起人 主题发起人 cy_g
  • 开始时间 开始时间
C

cy_g

Unregistered / Unconfirmed
GUEST, unregistred user!
我用dbchart做Gantt图,横坐标轴为日期格式。
现在我需要找出每星期的两个休息天,并将休息天的日期用红色显示,以便区别。
该如何做?
 
delphi自带的好像还没有这个功能
 
我已经知道答案,请版主:卷起千堆雪tyn, menxin 结束此问题。

在OnGetNextAxisLabel事件中
if ( Sender = DBChart1.BottomAxis ) then
begin
l_date:=StrToDate(labelText);
if (DayOfWeek(l_date)=1) or (DayOfWeek(l_date)=7) then
DBChart1.BottomAxis.LabelsFont.Color:=clRed
else
DBChart1.BottomAxis.LabelsFont.Color:=clBlack;
end


 

Similar threads

后退
顶部