Bar chart series item color not working

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Macromullet
Newbie
Newbie
Posts: 2
Joined: Tue Apr 08, 2003 4:00 am

Bar chart series item color not working

Post by Macromullet » Tue May 11, 2004 2:10 pm

I'm currently using build 1.1.1499.42325 of the product. I just had a bug report come in that series colors were wrong for one of my graphs. I have replicated the issue in the lab. Here is what i'm doing:

if (entry.status == STATUS_FAILED)
bar.Add(jentry.StartTime, newTime, Color.Red);
else
bar.Add(entry.StartTime, newTime, DEFAULT_BAR_COLOR);

I also have tried this:
if (entry.status == STATUS_FAILED)
bar.Add(jentry.StartTime, newTime, Color.Red);
else
bar.Add(entry.StartTime, newTime);

Neither one works. I get the series color for the majority of bars no matter what i do. It actually looks like it only colors the first point red, even though i have verified that the second point is red as well. I'm pretty confused at this point. Any help is greatly appreciated. If this is fixed in the latest build i can upgrade but I dont want to unless I have to because last time it was a struggle (gantt chart issues).

Macromullet
Newbie
Newbie
Posts: 2
Joined: Tue Apr 08, 2003 4:00 am

One thing i just found

Post by Macromullet » Tue May 11, 2004 2:15 pm

I was adding the bars right to left, that is, the first elements in the loop were actually the rightmost in the series (higher x value). I did a sort on the data prior to looping and now it looks like the colors are ok.

So, it may be a bug if you use colors per series item and the data is reverse ordered or just randomly ordered.

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

Post by Pep » Tue May 11, 2004 4:28 pm

Hi,

I'm glad to hear this (that works now).
So, it may be a bug if you use colors per series item and the data is reverse ordered or just randomly ordered.
I've tried to reproduce the problem here so we can fix it for the next release but I cannot see the problem, could you please post a simple code or tell me the steps I must do to see it ?

Post Reply