Page 1 of 1

Bar chart series item color not working

Posted: Tue May 11, 2004 2:10 pm
by 8119865
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).

One thing i just found

Posted: Tue May 11, 2004 2:15 pm
by 8119865
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.

Posted: Tue May 11, 2004 4:28 pm
by Pep
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 ?