Draw All Points of FastLine series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Draw All Points of FastLine series

Post by asupriya » Wed Apr 11, 2012 12:18 pm

We are using Fastline series and having weired issues with zooming when DrawAllPoints is set to false. When the graph is initially drawn with DrawAllPoints=False, with about 18000 plus data points, the display look nice and smooth with good curve fitting. However, when we either increase the tchart's width or use mouse based selection zoom, the display changed to some unexpected pattern. When DrawAllPoints = true is set, the display looks cluttered, but has predictable clarity when zoomed or tchart's width is increased.

Please see the attached doc file for screenshots. This is a serious issue for us and like to know if there is a solution.

Thanks
Attachments
Tchart-DrawAllPointsIssue.zip
(25.42 KiB) Downloaded 920 times

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

Re: Draw All Points of FastLine series

Post by Sandra » Wed Apr 11, 2012 3:02 pm

Hello asupriya,

Thanks for your information, but could you arrange a simple code, because we can reproduce exactly your problem here?

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

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Draw All Points of FastLine series

Post by asupriya » Mon Apr 16, 2012 10:18 am

Sandra,

Attached VS2008 code shows the problem. The input.txt file located in the solution folder is needed to replicate this issue as this issue can be best described with only non-random data.

Please suggest a solution.

Thanks,
Rajesh
Attachments
SampleTeeCart.zip
VS2008 project with input data file.
(439.14 KiB) Downloaded 1360 times

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

Re: Draw All Points of FastLine series

Post by Sandra » Mon Apr 16, 2012 3:24 pm

Hello Rajesh,

Thanks for your code. But I am not sure understand your problem because the behavior I get is correct for me. Can you please explain exactly what do you expect your project do, because we can try to reproduce and solve your problem?

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

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Draw All Points of FastLine series

Post by asupriya » Tue Apr 17, 2012 3:10 am

Sandra,

As stated and showed in my first post in this thread, the issue is that when we have DrawAllPoints=false, the graph display trend we get changes drastically with width of the chart.

For example, see the following images:

Please note that the 'Zoom' functionality simply increases the width of the graph panel and is not really a zoom in T-Chart's sense.

The initial display looks as follows:
1.jpg
1.jpg (77.74 KiB) Viewed 28298 times
After 4-5 clicks on the 'Zoom' button, the trend changes as follows:
2.jpg
2.jpg (70.44 KiB) Viewed 28290 times
After about 12 clicks on the 'Zoom' it changes as follows:
4.jpg
4.jpg (66.91 KiB) Viewed 28225 times

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

Re: Draw All Points of FastLine series

Post by Sandra » Wed Apr 18, 2012 11:26 am

Hello asupriya,

Ok. When DrawAllpoints property is set to false, it only draws the first point at any X pixel location. The option offers speed gains if large numbers of point repetitions occur at one X location and for reason your pattern is change when you change the size of Chart. In your case I suggest you change property DrawallPointsStyle as do in next line of code:

Code: Select all

   FastLine1.DrawAllPointsStyle = Steema.TeeChart.Styles.DrawAllPointsStyle.MinMax
Can you tell us if previous code help you?
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

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Draw All Points of FastLine series

Post by asupriya » Wed Apr 18, 2012 11:34 am

I am using the latest V3 (version 3.5.3700.30575) and I don't have that FastLine1.DrawAllPointsStyle property for fastline series.

Can you tell us the version of Tee Chart that you are using? If we need to upgrade to V2012, what is the migration, license fee, etc.?

Thanks

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

Re: Draw All Points of FastLine series

Post by Narcís » Wed Apr 18, 2012 11:39 am

Hi asupriya,
I am using the latest V3 (version 3.5.3700.30575) and I don't have that FastLine1.DrawAllPointsStyle property for fastline series.
As you can see in the version info page, DrawAllPointsStyle was implemented in v2011 (aka v4) for the 19th October 2011 release.
If we need to upgrade to V2012, what is the migration, license fee, etc.?
You'll find migration info. and options here.
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

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Draw All Points of FastLine series

Post by asupriya » Thu Apr 19, 2012 2:18 pm

The FastLine1.DrawAllPointsStyle = Steema.TeeChart.Styles.DrawAllPointsStyle.MinMax setting makes the display cluttered with points just as DrawAllPoints=True option.

You can try setting that option for the sample project I uploaded in this thread and see for yourself.

Please suggest any other solution for our problem.

Thanks,

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

Re: Draw All Points of FastLine series

Post by Sandra » Fri Apr 20, 2012 8:46 am

Hello asupriya,

In this case, I suggest you take a look in the demo project, concretely in the examples All Features\Welcome !\Functions\Extended\Reducing number of points that can help you to achieve reduce the number of points and I think can help you. If it doesn't serve you please let me know and we try to find other solution.

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

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Draw All Points of FastLine series

Post by asupriya » Fri Apr 20, 2012 10:17 am

Sandra,

Downsampling is not an option for us as we will run into various different issues when we do certain computations with data in the series. You will see in the example you mentioned in the All Features\Welcome !\Functions\Extended\Reducing number of points that by zooming, the curve fitting doesn't always cover the data points. Such an omission of data poses even more serious problems than the DrawAllPoints issue as it affect every dependent feature/calculation.

For example, we have Complex numbers with Real and Imaginary parts as separate waveforms and we compute phase angle and magnitude out of the actual data and display it as a phasor diagram (with polar chart and polar series). All such computations that depend on actual data get affected if we downsample the series data as we will loose exact relationship between the point on the waveform to point in the series object.

I request you to find another solution for us.

Thanks,

Marc
Site Admin
Site Admin
Posts: 1266
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Draw All Points of FastLine series

Post by Marc » Fri Apr 20, 2012 12:20 pm

Hello,

To summarise to now:
DrawAllPoints doesn't remove data but the paint depends on which first x value arrives at which pixel location. As resizing of the Chart changes the Xvalue/pixel relationship the appearance of the plot changes. We have learnt that this solution is unacceptable in this case as there is a large variation in y values between consecutive points and the plot changes notably on resize.

DownSampling reduces the number of points, the plot level itself can be set to how much the sampling takes place and remains constant on chart resize as the result is obtained via calculation not via physical conditions (as in the case of DrawAlPoints). We have learnt that this solution is unacceptable in this case as dependant Series are adversely affected by the reduced sampled dataset.

Proposed solution:
We suggest that you keep the 'base' Series with the full atomic level of data points; that this original Series is set to Active False so as not to be visible, but acts as the datasource for dependent Series. That a new Series is added as a downsample of that series (as in the example in the TeeChart demo, where the source Point Series is not visible). Your other dependent Series can use the first 'atomic level' Series too as their datasource.

If you require a direct atomic point level relationship across all data series (even if that level may not be easy on the eye) then we feel you have no choice but to plot all points; otherwise please tell us how you think the plot might best be made and we'll try and tell you how to technically obtain that if we feel it's possible.

I hope that may be of help.
Regards,
Marc Meumann
Steema Support

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Draw All Points of FastLine series

Post by asupriya » Fri May 25, 2012 9:49 am

Marc,

The proposed solution is not going to be feasible for us.

Here is what we decided and like to see if TChart can help us with this.

As is shown in the posted image above messagehttp://www.teechart.net/support/posting ... 08#pr57399, the zoomed image shows stepped connecting line between the points when DrawAllPoints is set to true. The sample attached in this thread above is a good one to reproduce the problem (with DrawAllPoints set to true) when you zoom close enough to see each waveform.

What we need is a way to smooth these stepped lines such that we provide a smooth curve fitting at every zoom level.

Thanks and best regards,
Rajesh

Marc
Site Admin
Site Admin
Posts: 1266
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: Draw All Points of FastLine series

Post by Marc » Fri May 25, 2012 2:21 pm

Hello Rajesh,

Using your test project I added a Smoothing function to the FastLine Series with DrawAllPoints true. The result gives the following chart for that dataset:
Smoothed FastLine.jpg
TeeChart Smoothing Function applied to FastLine data
Smoothed FastLine.jpg (146.39 KiB) Viewed 28181 times
Is that the kind of output you're looking for? Sample built with TeeChart for NET v2012.

Regards,
Marc
Steema Support

asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Re: Draw All Points of FastLine series

Post by asupriya » Sun May 27, 2012 3:33 am

Marc,

Yes. This is what we want. Can you provide the details/snippet of smoothing function you used? Is it available in V3? We haven't upgraded to V2012 yet.

Thanks

Post Reply