Stacked bar
Stacked bar
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?
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.
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.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
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 ?
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 ?
Marjan Slatinek,
http://www.steema.com
http://www.steema.com