AddGanttColor - changing color

TeeChart for ActiveX, COM and ASP
Post Reply
AHIS
Newbie
Newbie
Posts: 19
Joined: Wed Feb 22, 2006 12:00 am
Location: Austria

AddGanttColor - changing color

Post by AHIS » Thu May 04, 2006 9:33 am

Hi.

I create some Gantt-Bars using AddGanttColor with different colors which works perfect. But how can I change the color of one of the bars afterwards? Because if I use TChart:Series(0):asGantt:Pointer:Brush:COLOR it applies to all bars in the series...

thanks,

Harry

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu May 04, 2006 9:51 am

Hi Harry,

You can change it using the OnGetSeriesPointerStyle and something like this:

Code: Select all

Private Sub TChart1_OnGetSeriesPointerStyle(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, AStyle As TeeChart.EPointerStyle)
    If (ValueIndex = 5) Then
        TChart1.Series(SeriesIndex).asGantt.Pointer.Brush.Color = clBlack
    Else
        TChart1.Series(SeriesIndex).asGantt.Pointer.Brush.Color = clTeeColor
    End If
End Sub
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply