Calendar Series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MT64
Newbie
Newbie
Posts: 5
Joined: Mon Mar 08, 2004 5:00 am

Calendar Series

Post by MT64 » Sun Jul 11, 2004 11:42 am

I wish to set some specified days font( color/style) on calendar series by code.
If it can be done,please show me a small exsample code (also for AX).
Thank you in advance.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 12, 2004 2:25 pm

Hi,

it cannot be done directly, the only way around this is doing something like this (drawing a rectangle setting custom colors and add some more text using the TextOut method) :

Code: Select all

Private Sub TChart1_OnBeforeDrawSeries()
With TChart1
.Canvas.Brush.Color = vbYellow
.Canvas.Rectangle .Series(0).asCalendar.RectCell(2, 5).Left, _
.Series(0).asCalendar.RectCell(2, 5).Top, _
.Series(0).asCalendar.RectCell(2, 5).Right, _
.Series(0).asCalendar.RectCell(2, 5).Bottom
.Canvas.TextOut .Series(0).asCalendar.RectCell(2, 5).Left + 5, .Series(0).asCalendar.RectCell(2, 5).Top + 1, "Text"
End With
End Sub

Post Reply