Page 1 of 1

Add line segments to a series one at a time causes sorting

Posted: Tue Mar 30, 2004 2:42 pm
by 8119814
The latest versions of TeeChart introduced undesired behavior regarding the Series. Adding line segments using Add(x, y, color) method is causing sorting to be performed before the lines are drawn. I need the ability to draw closed loops such as triangle or diamond shapes using different colors for each line. The sorting disrupts the order and the resulting shape is not what the user intended.

Can you investigate this issue and let me know if this is a bug or a design change? Also, can you show me a workaround that allows me to add items to a line series one a time specifying individual colors for each line segment?

Thank you for your prompt attention to this matter,

Adam Baranski
Haestad Methods Inc.

Posted: Thu Apr 01, 2004 9:19 am
by Pep
Hi Adam,
line segments using Add(x, y, color) method is causing sorting to be performed before the lines are drawn. I need the ability to draw closed loops such as triangle or diamond shapes
You can set the order to loNone like :
line1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
Also, can you show me a workaround that allows me to add items to a line series one a time specifying individual colors for each line segment?
Yes, you can do something like this :
line1.Add (3,10,Color.Brown);
line1.Add (1,20,Color.Blue);
line1.Add (5,30,Color.Yellow);

Posted: Thu Apr 01, 2004 2:40 pm
by 8119814
So it looks like the default XValues.Order changed from ValueListOrder.None to ValueListOrder.Ascending in the latest TeeChart code.

Thanks for the reply,
Adam

Posted: Sat Jan 28, 2006 12:30 am
by 8128589
Looks like this is still a defect. The sort order on my fastlines always get set back to "Ascending" no matter what I set them to in the designer.

I have to comment that I am getting very frustrated with all the serialization defects in TeeChart. Each graph we do has a huge section where we set parameters to the correct values. You can't count on the designer to do it's job.

Posted: Mon Jan 30, 2006 10:20 am
by narcis
Hi Gp,

Which TeeChart version are you using?

Posted: Mon Jan 30, 2006 5:28 pm
by 8128589
2.0.2040.15119

Updating isn't all that simple for us since we have to compile in our own version of Fastline that doesn't draw all points but also doesn't change the appearance of the data (hint hint - would be great if that's the way it worked). So we really need to know if a new release will solve these problems and that we won't have to upgrade again a month later.

Posted: Tue Jan 31, 2006 9:48 am
by narcis
Hi Gp,

This has been fixed for a long time. Have you checked that the TeeChart.dll reference on your project has been updated to the version you mention?

For example, the code below draws a fastline series not being sorted.

Code: Select all

			this.fastLine1.Add(2);
			this.fastLine1.Add(12);
			this.fastLine1.Add(32);
			this.fastLine1.Add(22);
			this.fastLine1.Add(21);
			this.fastLine1.Add(6);
If the problem persists please send us an example we can run "as-is" to reproduce the problem here. You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Posted: Tue Jan 31, 2006 5:18 pm
by 8128589
I have checked the reference and it is correct.

The example you gave is fine but that isn't the problem - The problem is I set the XValues Order to "None" but it always gets changed back to "Ascending". When I force the order to "None" in code everything is fine, but I don't think I should have to do that!

Posted: Wed Feb 01, 2006 12:05 pm
by narcis
Hi Gp,

Thanks for clearing that. Sorry but I hadn't understood what you meant. I've been able to reproduce the issue and added it to our bug list (TF02011214) to be fixed for future releases.

Posted: Mon Feb 27, 2006 3:48 pm
by narcis
Hi Gp and Annelise,

We have been looking further into it and our conclusion is that current behaviour is by design.

Code: Select all

So it looks like the default XValues.Order changed from ValueListOrder.None to ValueListOrder.Ascending in the latest TeeChart code. 
We are not able to check that but if that's the case that was the undesired behaviour as lines are thought to represent sequential data. For example, if you plot some value for each month and you don't have april data until the end of the year but you have other months data, it wouldn't make sense that the line was drawn backwards and forward again.

In conclusion, what it may not be properly specified is the sorting at the chart editor. That sorting corresponds to the Y values. So we added an item on our wish-list to include X and Y values sorting in future releases.

Posted: Fri May 19, 2006 8:02 pm
by 8128589
This is still not the problem.

Problem:
Set sort order to "None" in the editor.
Close editor.
Open editor.

Sort order has been set back to "Ascending" without any user intervention.

The problem is I set the sort order to "None" but TeeChart changed it back. Now, everywhere we have a chart in the constructor after "InitializeComponent()" we have to add a line of code to set the sort order to what we want.

Posted: Mon May 22, 2006 9:37 am
by narcis
Hi Gp,

Which TeeChart version are you using? We have latelly done some enhancements in that field and this should work fine on our latest maintenance release from 8th May.

Posted: Mon May 22, 2006 4:56 pm
by 8128589
2.0.2040.15119 - not new.

Posted: Tue May 23, 2006 8:20 am
by narcis
Hi Gp,

To have a fix for this you should use build 2.0.2306.26231 which is the latest version available at our Customer Download Area.