stacking problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
waynewil
Newbie
Newbie
Posts: 9
Joined: Wed Feb 25, 2004 5:00 am
Location: on-planet

stacking problem

Post by waynewil » Sat Feb 28, 2004 6:39 am

I'm charting a 4 series stacked bar graph.

My problem is that a thin line of color still shows up at the top of the bar graph for the 4th series, even when the value for that bar/series is 0.

This is distracting to my users, as they don't want to see the color in question at all when there is no data for that color.

Waynewil

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

Post by Pep » Sat Feb 28, 2004 10:56 am

Hi Wayne,

using the latest build of TeeChart, Build 1.1.1499.42325 this can be solved adding the bars which the value is 0 with Color.Transparent :

Code: Select all

			bar1.Add (10,"");
			bar1.Add (0,"",Color.Transparent);
			bar1.Add (15,"");
			bar1.Add (3,"");
			bar1.Add (12,"");

			bar2.Add (30,"");
			bar2.Add (0,"",Color.Transparent);
			bar2.Add (0,"",Color.Transparent);
			bar2.Add (10,"");
			bar2.Add (34,"");

			bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Stacked;

waynewil
Newbie
Newbie
Posts: 9
Joined: Wed Feb 25, 2004 5:00 am
Location: on-planet

Post by waynewil » Sat Feb 28, 2004 3:23 pm

Thanks for the reply, Josep.

However, I still require a little clarification.

I've got four series being fed by a dataset. It is the top series in the stack that seems to have the persistent line. Are you saying that I should add a fifth series with a value of zero and a transparent color, so that the top series still persists - it just can't be seen?

Wayne

waynewil
Newbie
Newbie
Posts: 9
Joined: Wed Feb 25, 2004 5:00 am
Location: on-planet

Post by waynewil » Sat Feb 28, 2004 7:47 pm

Josep,

Actually, this problem is a little more irritating than I previously described.

Through experimenting, I've found that if I have the following situation for a column:

Bar 1 = 20
Bar 2 = 0
Bar 3 = 10
Bar 4 = 0

Thin lines show up for Bar 2 and Bar 4 in their respective colors, which is very distracting to the user. This system being fed by a dataset and graphing automatically, including with appropriate scaling, bar width, etc., I'd really rather not manually make the color transparent per column.

Can you guys simply not fix this to make sure that if a bar has a value of zero, it doesn't show up in a stacked graph?

Wayne

Marc
Site Admin
Site Admin
Posts: 1217
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Mar 02, 2004 9:53 pm

Hello Wayne,

We'll put this down for review. The present design differentiates zeros from nulls (eg. for null can put Add("");), desirable too in some cases.

Regards,
Marc Meumann
Steema Support

waynewil
Newbie
Newbie
Posts: 9
Joined: Wed Feb 25, 2004 5:00 am
Location: on-planet

Post by waynewil » Wed Mar 03, 2004 1:49 am

Marc,

Thanks for responding. Actually, that solves my problem completely. I was using calculated fields from the dataset anyway, so I just used the IIF function to return a null if the result was zero.

Thanks a million. You had me sweating there for a bit, as I have used your graphing tool since it first came out (in Delphi), so I insisted on using your tool for this project...which would have made me look bad if it didn't work. Now I can look bad for other reasons! :D

Wayne

Post Reply