Page 1 of 1

Stacked bar

Posted: Fri Mar 05, 2004 10:46 am
by 5892718
I'm running with 4 series connected to IBQuery components on a DB chart. The chart is a stacked bar graph. With some queries there is space between the bars when each bar should sit on top of each other. Is there any way I can correct this problem?

Posted: Fri Mar 05, 2004 11:28 am
by Marjan
Hi, David.

The stacking algorithm will work correctly only if all bars have the same number of (valid) points and all points x values coincide. If this is not the case, stacking will fail and you'll end up with chart "type" you reported.

Workarounds :
- First, make sure all points really have the same number of non-null points.
- Next make sure all points have the same x values (for bar series this should not be problematic since x value is usually automatic point index)

In one of these two conditions is not met you'll have to manually populate series with data (using add method) and use AddNull method to add missing null points. Only then will the stacking algorithm work correctly.

Posted: Mon Mar 08, 2004 1:11 pm
by 5892718
I see. I was hoping that it would treat null values within a query but I guess not. I'll have to try it manually then.

Thanks
Dave

Posted: Mon Mar 08, 2004 3:49 pm
by Marjan
Hi, David.

Hmm... If you have some missing values in the query (true nulls, not zeros), then the internal algorithm should use the AddNull method to add null points. Can you check if the missing values in Query are really nulls ?