Points disappearing

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Points disappearing

Post by Mike Jones » Fri Apr 24, 2009 8:32 pm

I have a situation where I am charting around 9000 points in a CustomPoint Series

If I zoom in or out and then pan the chart I can get a set of the points to disappear. It seems to occur only under certain circumstances. In otherwords I can pan just a little more up or down and the points will all of the sudden reappear. I have seen points drop out of the middle of the line as well.

See Before pan
http://tinyurl.com/cxvdk7

See After pan
http://tinyurl.com/d5xvke

Notice that the the entire top set of points have vanished?

1. Can you point me to an method in the source code responsible to calculating the clipped region for a CustomPoint style?
2. Any thoughts on why this might be happening?

We are using Source Code from version 3.5.3225.3218

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Mon Apr 27, 2009 10:11 am

Hello Mike,


Your version it's a bit old :). I recomend that download the last version of TeeChartFor .Net, because in the lastets versions we have solved similar problems.


Please, check if your code works fine with last version of TeeChartFor .NET


Thanks,
Best Regards,
Sandra Pazos / 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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

After Upgrade

Post by Mike Jones » Mon Apr 27, 2009 3:10 pm

After upgrade I still have the same problem. Since we own the source code, can you point me to the location where the clipping logic is implemented?

I will try to create a sample application that will demonstrate the problem for you. It might take me a couple of days.

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 Apr 27, 2009 3:26 pm

Hi Mike,
After upgrade I still have the same problem. Since we own the source code, can you point me to the location where the clipping logic is implemented?
I think this should be in series class drawing routines. Probably at Steema.TeeChart.Styles.Custom.DrawPoint in Custom.cs.
I will try to create a sample application that will demonstrate the problem for you. It might take me a couple of days.
Yes, that would be really helpful so that we can debug the issue here and try to find a solution.
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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Difficulty reproducing in a simple example

Post by Mike Jones » Tue Apr 28, 2009 9:59 pm

I am having problems reproducing the problem in a simple example, but I am learning a little more about the problem

I find if I use the standard editor that comes with the TeeChart I can do some things that give me some clues as to what is going on

If I clone the series that has points missing I will see all points
Any combination making the cloned series or the original series visible always has the same effect. Always can see the visible series when its visible and the original series always is missing the same points
After zooming and panning to make part of the series points disappear, I can click the button with the tool tip = Normal and always display all the points

1. I did a comparison on the order of the points between the original series and the cloned series. I see that the points are ordered very differently. Would this cause a problem in any logic on when to draw and not draw a point?

2. How does the Stacked combobox setting affect how points might be drawn? The choices are None, Overlapped, Stacked, Stacked 100%

3. How does the Treat nulls combobox settings affect what is drawn? The choices are Don't paint, Skip, or Ignore.

4. My best guess is the problem I am seeing is a clipping bug and it is based on the order of the points. I find if I go to the Editor/Series/General tab in the editor, I change the sort to anything but None, I get a flat line of points. When I change it back to None, it remains a flat line of points. Looks like changing the sort does not remember the original order of the points. Why would reordering the points change what it charts?

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 Apr 29, 2009 8:11 am

Hi Mike,
1. I did a comparison on the order of the points between the original series and the cloned series. I see that the points are ordered very differently. Would this cause a problem in any logic on when to draw and not draw a point?
This can change the order in which the points are plotted and therefore some different considerations (or not considered cases) for deciding whether a point has to be drawn or not.
2. How does the Stacked combobox setting affect how points might be drawn? The choices are None, Overlapped, Stacked, Stacked 100%
It may differ in the way that each point needs to be considered relative to others before being painted and therefore another logic may apply here.
3. How does the Treat nulls combobox settings affect what is drawn? The choices are Don't paint, Skip, or Ignore.
It affects if previous or following points to the point processed or the point itself needs to be drawn and hence another logic for deciding if a point needs to be painted.
4. My best guess is the problem I am seeing is a clipping bug and it is based on the order of the points. I find if I go to the Editor/Series/General tab in the editor, I change the sort to anything but None, I get a flat line of points. When I change it back to None, it remains a flat line of points. Looks like changing the sort does not remember the original order of the points. Why would reordering the points change what it charts?
Because the points are sorted in the ValueLists. Points are plotted in the order they are on the ValueLists and therefore changes what it's drawn.

As you can see there are many possibilities here. It would be really helpful if you could send us an example project reproducing the issue.

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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Difficulty reproducing

Post by Mike Jones » Wed Apr 29, 2009 12:46 pm

I am have trouble reproducing the problem in a simple example. I want to make sure I have the points in the exactly the same order so if it is a problem with the order It should be reproducible in a simple example as well as my real application.

Is there an easy way to import a set of points via a text file and ensure that the order is not changed?

I import a set of sample data then export it out and the order of the points has changed dramatically.

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 Apr 29, 2009 1:12 pm

Hi Mike,

By default series XValues are ordered ascendingly and YValues have no order. Before loading data into a series you could make sure their XValues.Order property is set to none:

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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

ordering

Post by Mike Jones » Wed Apr 29, 2009 1:44 pm

That worked so it appears the order of the points is now the same but I am still having difficulty reproducing the problem in a simple example. I will continue work on this

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Uploaded Example

Post by Mike Jones » Wed Apr 29, 2009 2:39 pm

I just uploaded a zip file, ChartDisappearingPoints.zip. It is a Visual Studio 2005 project that demonstrates the problem I am seeing.

I used the latest Release of TChart.
I also included a flash video demonstrating what I am seeing.

I look forward to your response.

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 Apr 29, 2009 2:59 pm

Hi Mike,

Thanks for the example project. I could reproduce the issue here and added it (TF02014120) to the defect list to be investigated. I've seen that your project loads a *.ten file. It may be necessary seeing how the chart in the template file has been created so it will be very helpful if you find a way to recreate it programmatically reproducing the issue too.

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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Priority

Post by Mike Jones » Wed Apr 29, 2009 3:06 pm

This issue is very important to our customers. If we cannot chart the data accurately, it can have a negative impact on our relationship with our customers.

Is it possible to make this issue a high priority so we can have an answer before the end of the week?

I will continue trying to duplicate the problem by programatically re-creating the data. I will post it as soon as I am able to successfully reproduce the problem.

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 Apr 30, 2009 10:57 am

Hi Mike,

The problem here is XValues.Order. Setting it back to its default value after loading the template chart solves the issue:

Code: Select all

        public Form1()
        {
            InitializeComponent();

            tChart1.Import.Template.Load("chart1.ten");

						tChart1[0].XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
						tChart1[0].XValues.Sort();

						SetPanMode();
        }
Can you please check if this works fine at your end?

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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

proposed solution

Post by Mike Jones » Thu Apr 30, 2009 2:11 pm

While your proposed solution works, it is not efficient. We may have 100 CustomPoint Series in the chart's series collection. While we rarely have more than 10 series visible at one time, each series can have literally 10's of thousands of points each. Sorting that # of point can be very time consuming.

The algorithms in which our data is generated it can get close to having the data sorted, but cannot guarantee it 100% of the time. It is a very inefficient processes to guarantee this. If we use the solution you suggested it will cause our application to become increasingly more sluggish. We must have the chart UI to be as responsive as possible.

I wonder why the points are drawn when the chart first is displayed but when the user pans and zooms the points get clipped? This seems to be an issue that needs to be addressed?

Should I possible be using a different series style since I am not needing to connect the dots?

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 Apr 30, 2009 2:23 pm

Hi Mike,

That's because those are default values and need to be set again because in your *.ten file you previously changed them. Otherwise it would work fine. Do you have a special need for changing them?
Should I possible be using a different series style since I am not needing to connect the dots?
Most series use base series classes drawing algorithms to decide whether a point needs to be plotted or not. So I think this wouldnt help much.
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