Page 1 of 1
Stacked bar chart
Posted: Mon Jun 07, 2004 9:18 pm
by 8120653
Is there a way to have the marks on a stacked bar chart display on "top" of the bar the mark applies to instead of "behind" the next bar on the stack? Also, is there a way to have it where each series containing a stacked bar is sorted by the actual value of the y axis and not the label?
Posted: Tue Jun 08, 2004 7:51 am
by Pep
Hi,
the easiest way to move marks inside is to set marks arrowlength property to negative value. Another possibility (a bit more complicated, but more customizable) is to move marks by using custom positioning.
Posted: Tue Jun 08, 2004 2:26 pm
by 8120653
Thanks, that worked. Is there a way you can display the total of all values in the stack at the end of the stack? Also, how can you get it to where each stack is sorted by the actual value instead of the label? For example, I have a graph that displays the number of times a safety incident has occured for each supervisor by type of incident in the plant. When I use stack horizontal bars, it displays the number of incidents by each type for each supervisor in the order of incident type and not in the order of number of incidents. Is there a way of having it sort by number of incidents for each supervisor?
Posted: Wed Jun 09, 2004 3:56 pm
by Pep
Hi,
Is there a way you can display the total of all values in the stack at the end of the stack?
Yes, one way could be to customize the Mark of one series in the OnGetMarkText and make the other Marks Series invisible.
Also, how can you get it to where each stack is sorted by the actual value instead of the label? For example, I have a graph that displays the number of times a safety incident has occured for each supervisor by type of incident in the plant. When I use stack horizontal bars, it displays the number of incidents by each type for each supervisor in the order of incident type and not in the order of number of incidents. Is there a way of having it sort by number of incidents for each supervisor?
Yes, you can use the Order property :
Code :
Code: Select all
horizBar1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
horizBar1.XValues.Sort();
horizBar1.YValues.FillSequence();
horizBar2.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
horizBar2.XValues.Sort();
horizBar2.YValues.FillSequence();