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

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Glenn F. Henriksen
Newbie
Newbie
Posts: 52
Joined: Tue Mar 04, 2003 5:00 am

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

Post by Glenn F. Henriksen » Tue Mar 30, 2004 2:42 pm

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.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Apr 01, 2004 9:19 am

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);

Glenn F. Henriksen
Newbie
Newbie
Posts: 52
Joined: Tue Mar 04, 2003 5:00 am

Post by Glenn F. Henriksen » Thu Apr 01, 2004 2:40 pm

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

Gp
Newbie
Newbie
Posts: 43
Joined: Thu Jan 13, 2005 5:00 am

Post by Gp » Sat Jan 28, 2006 12:30 am

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.

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

Post by Narcís » Mon Jan 30, 2006 10:20 am

Hi Gp,

Which TeeChart version are you using?
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

Gp
Newbie
Newbie
Posts: 43
Joined: Thu Jan 13, 2005 5:00 am

Post by Gp » Mon Jan 30, 2006 5:28 pm

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.

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

Post by Narcís » Tue Jan 31, 2006 9:48 am

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.
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

Gp
Newbie
Newbie
Posts: 43
Joined: Thu Jan 13, 2005 5:00 am

Post by Gp » Tue Jan 31, 2006 5:18 pm

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!

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

Post by Narcís » Wed Feb 01, 2006 12:05 pm

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.
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

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

Post by Narcís » Mon Feb 27, 2006 3:48 pm

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.
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

Gp
Newbie
Newbie
Posts: 43
Joined: Thu Jan 13, 2005 5:00 am

Post by Gp » Fri May 19, 2006 8:02 pm

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.

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

Post by Narcís » Mon May 22, 2006 9:37 am

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.
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

Gp
Newbie
Newbie
Posts: 43
Joined: Thu Jan 13, 2005 5:00 am

Post by Gp » Mon May 22, 2006 4:56 pm

2.0.2040.15119 - not new.

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

Post by Narcís » Tue May 23, 2006 8:20 am

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.
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