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.
Auto sorting values in line chart
Auto sorting values in line chart
Thank you.
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:
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:
That/s why line1.Clicked returns 0 and 1 instead of something about 34 and 33.
So help me to cope with my problem.
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:
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:
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.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bairog,
Have you tried setting XValues.Order to None before populating series? For example:
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 |
Instructions - How to post in this forum |
Yes. Take a look a my post above, please. I've wrote thatnarcis 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;
bairog wrote:line1.XValues.Order property is set to None. So I expect xvalues not to be sorted after adding them
Thank you.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |