Auto sorting values in line chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Auto sorting values in line chart

Post by bairog » Wed Mar 12, 2008 4:15 pm

I've added points to my line chart in next sequence:
(5, 3), (3, 2), (6, 1), (1, 4).
And after that I moved mouse over the fourth point (1, 4) and line.Clicked function returned me number of point = 0. It seems like line chart automatically sorts point by Xvalues in ascending order.
Tell me please how can I switch off this function.
Thank you.

bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Post by bairog » Thu Mar 13, 2008 8:02 am

Some additional infomation about my problem. Here is a large example:

line1.XValues.Order property is set to None. So I expect xvalues not to be sorted after adding them. In cycle I add points to my line and insert data into a datacridview. Here it is:
Image
Image

So you can see that first point has (X, Y) coordinate is (21.53, 744.44), second point has (X, Y) coordinate is (22.71, 748.15). I my adding cycle line1[0] and line[1] returns correct data. But after that line1[0] becomes (10.91, 729.63) and line1[1] becomes (10.91, 725.93). So everything lookes like xvalues have been sorted. After that I'm trying to display a hint from my datagridview data when line1.Clicked function returns some point index and I see the following:
Image
Image
That/s why line1.Clicked returns 0 and 1 instead of something about 34 and 33.

So help me to cope with my problem.
Thank you.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 13, 2008 10:18 am

Hi bairog,

Have you tried setting XValues.Order to None before populating series? For example:

Code: Select all

			points1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Post by bairog » Fri Mar 14, 2008 3:46 am

narcis wrote:Have you tried setting XValues.Order to None before populating series? For example:

Code: Select all

			points1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
Yes. Take a look a my post above, please. I've wrote that
bairog wrote:line1.XValues.Order property is set to None. So I expect xvalues not to be sorted after adding them
Thank you.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 14, 2008 9:45 am

Hi bairog,

Ok, it's not only important setting order to none. It's also important setting it *before* populating series.

If the problem persists, could you please send us a simple example project we can run "as-is" and let us know the exact TeeChart version you are using so that we can reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply