Page 1 of 1

Auto sorting values in line chart

Posted: Wed Mar 12, 2008 4:15 pm
by 9641771
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.

Posted: Thu Mar 13, 2008 8:02 am
by 9641771
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.

Posted: Thu Mar 13, 2008 10:18 am
by narcis
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;

Posted: Fri Mar 14, 2008 3:46 am
by 9641771
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

Posted: Fri Mar 14, 2008 9:45 am
by narcis
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.