GantChart - Pen Color

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bora
Newbie
Newbie
Posts: 5
Joined: Wed Jan 25, 2006 12:00 am

GantChart - Pen Color

Post by bora » Mon Apr 17, 2006 8:50 am

hi,
is it possible to set different color for individual bars in a serie in gant chart... if it's how...

Bora

bora
Newbie
Newbie
Posts: 5
Joined: Wed Jan 25, 2006 12:00 am

Post by bora » Mon Apr 17, 2006 8:53 am

i think i wrote color, i meant pen color...

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

Post by Narcís » Wed Apr 19, 2006 10:15 am

Hi bora,

Yes, you can do it using Gantt series GetPointerStyle event and doing something like this:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      gantt1.FillSampleValues();
    }

    private void gantt1_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventArgs e)
    {
      series.Pointer.Pen.Color = Color.FromArgb(e.ValueIndex*10,e.ValueIndex*10,e.ValueIndex*10);
    }
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