Order of Labels

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MVB
Newbie
Newbie
Posts: 7
Joined: Thu Dec 31, 2009 12:00 am

Order of Labels

Post by MVB » Thu Mar 04, 2010 11:30 am

Hi,

I have an issue with the order of my labels in the chart series points.

I add 4 data points where the X Values are not in the order in which they are going to appear in the chart.
The points in the chart series are in the correct x-order, but the labels for those points are the labels as added in the code, and do not follow the order of the data points.

A small example will clarify my problem:

Code: Select all

Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar();
m_tchart.Series.Add(bar);
bar.Add(5, 5, "Test 5");
bar.Add(3, 3, "");
bar.Add(10, 10, "Test 10");
bar.Add(7, 7, "");
So, the order of the points in the charts is by x value, being 3,5,7,10
But the first point in the chart will get label "Test 5", the second point will have empty label, the third point will have label "Test 10" and so on.

See the screenshot for the resulting chart.

How can I solve this?

Many thanks,
Marijke.
Attachments
labels.gif
Screenshot
labels.gif (89.6 KiB) Viewed 2839 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Order of Labels

Post by Yeray » Fri Mar 05, 2010 9:01 am

Hi Marijke,

I've reproduced it and added to the defect list to be fixed in future releases (TF02014710). In the meanwhile you could set the series XValues order to None before adding your points:

Code: Select all

Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar();
m_tchart.Series.Add(bar);
bar.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None; //workaround
bar.Add(5, 5, "Test 5");
bar.Add(3, 3, "");
bar.Add(10, 10, "Test 10");
bar.Add(7, 7, "");
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Order of Labels

Post by Yeray » Fri Apr 09, 2010 11:08 am

Hi Marijke,

After reviewing this, we don't consider it to be a bug but an expected behaviour for design reasons. Sometimes, one would like to add labels in order and sometimes not and TeeChart needs to know if the order of addition matters or not.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply