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.
Calendar Series
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) :
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
Pep Jorge
http://support.steema.com
http://support.steema.com