Page 1 of 1
Calendar Series
Posted: Sun Jul 11, 2004 11:42 am
by 9336040
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.
Posted: Mon Jul 12, 2004 2:25 pm
by Pep
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