Unusual BarChart series display?
Posted: Mon Oct 23, 2006 9:16 pm
I am trying to display a multi-series bar chart. The user will have the ability to set the chart to display in Side, Stacked, or Stacked 100% mode. Everything seems okay until one of my values for the bar chart is negative.
I created a sample application containing just one TChart component (latest version) and two BarSeries made up of your sample data. I changed one of the values in the data to be negative, please see a screenshot at http://www.ackerson.us/Data/BarChart/data.jpg.
When I try to view this chart in Side mode, it displays properly, as in the following screenshot: http://www.ackerson.us/Data/BarChart/side.jpg. Note the negative value in position 1 on the X-Axis for Series1.
Then I tried to create a Stacked bar; this is where things got kind of odd. In the screenshot: http://www.ackerson.us/Data/BarChart/stacked.jpg, you can see for my only negative bar, it does not appear stacked *below* the positive valued bar from Series2, but rather it seems to be drawn in front of it. Correct me if I am wrong, but the stacked bars in position 1 on the X axis should be presented the same as those in positions 2, 3, 4, etc.
That is with the Series belonging to the same Group. If I place them in different groups, the following is the result: http://www.ackerson.us/Data/BarChart/StackedGroup.jpg, which also looks like the negative bar in X-axis position 1 is drawn on a different Z-axis coordinate.
Finally the Stacked 100 mode seems to completely eliminate my negative bar, as follows: http://www.ackerson.us/Data/BarChart/stacked100.jpg. This is when both Series are in the same group. If I separate them into different groups, my positive and negative value bars in position 1 display side by side, as follows: http://www.ackerson.us/Data/BarChart/st ... 0Group.jpg.
This cannot all be correct behavior, can it? Please tell me how to get stacked bars to display *stacked* in the same Z plane when one is positive and the other is negative.
Thank you.
Rich
I created a sample application containing just one TChart component (latest version) and two BarSeries made up of your sample data. I changed one of the values in the data to be negative, please see a screenshot at http://www.ackerson.us/Data/BarChart/data.jpg.
When I try to view this chart in Side mode, it displays properly, as in the following screenshot: http://www.ackerson.us/Data/BarChart/side.jpg. Note the negative value in position 1 on the X-Axis for Series1.
Then I tried to create a Stacked bar; this is where things got kind of odd. In the screenshot: http://www.ackerson.us/Data/BarChart/stacked.jpg, you can see for my only negative bar, it does not appear stacked *below* the positive valued bar from Series2, but rather it seems to be drawn in front of it. Correct me if I am wrong, but the stacked bars in position 1 on the X axis should be presented the same as those in positions 2, 3, 4, etc.
That is with the Series belonging to the same Group. If I place them in different groups, the following is the result: http://www.ackerson.us/Data/BarChart/StackedGroup.jpg, which also looks like the negative bar in X-axis position 1 is drawn on a different Z-axis coordinate.
Finally the Stacked 100 mode seems to completely eliminate my negative bar, as follows: http://www.ackerson.us/Data/BarChart/stacked100.jpg. This is when both Series are in the same group. If I separate them into different groups, my positive and negative value bars in position 1 display side by side, as follows: http://www.ackerson.us/Data/BarChart/st ... 0Group.jpg.
This cannot all be correct behavior, can it? Please tell me how to get stacked bars to display *stacked* in the same Z plane when one is positive and the other is negative.
Thank you.
Rich