Hi,
Consider the following case:
Say we have 3 barseries with 4 values in each serie, mulitbar is set to mbSide. This means that on each x-axis label there will be 3 bars, one bar representing one value for each serie. What I need to do is sort theese 3 bars(i.e 3 values from 3 different series) on each x-axis label in ascending order, so that for label A the user can directly see which serie that has the highest value and so on... Does anyone have any suggestions how to do this? As I read it the Sort function only sorts series "internally".
Best Regards,
Johan Ingemansson
sorting multiple series on each label
Hi Johan,
I'm afraid there's not a way to do this automatically. The only way I can think of would be by sorting them before to add the data to the Chart. This means that in order to see each bar group with different color order you will need to add the data specifying the the specific color.
I'm afraid there's not a way to do this automatically. The only way I can think of would be by sorting them before to add the data to the Chart. This means that in order to see each bar group with different color order you will need to add the data specifying the the specific color.
Code: Select all
With TChart1
.AddSeries scBar
.AddSeries scBar
.AddSeries scBar
' check the order
.Series(0).Add 10, "A", vbRed
.Series(1).Add 20, "A", vbBlue
.Series(2).Add 30, "A", vbGreen
.Series(0).Add 50, "B", vbBlue
.Series(1).Add 70, "B", vbRed
.Series(2).Add 100, "B", vbGreen
End With
Pep Jorge
http://support.steema.com
http://support.steema.com