Dont link 'zero' point of a TLineSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Marco
Newbie
Newbie
Posts: 4
Joined: Mon Aug 18, 2014 12:00 am

Dont link 'zero' point of a TLineSeries

Post by Marco » Wed Jan 28, 2015 4:31 pm

Hello,

Concerned version : TeeChart Pro V2011.04 VCL

I will try to illustrate my question with pictures. The context is a data logging in function of the time. For some reasons, the data can be null (= 0), and in this case they should not appear on the chart. But here is what I got for the moment (X axis is the time) :
Image
On this example, values between minute 8 and 175 are equal to 0

What I would like to obtain is this :
Image
Points between 0 and real data are not linked !

I try to use the "TreatNulls" property of the series with tnSkip and tnIgnore without success (before each point).

How could I proceed for that ? I hope I was clear !
Thanks for your help
Bye

Yeray
Site Admin
Site Admin
Posts: 8754
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Dont link 'zero' point of a TLineSeries

Post by Yeray » Thu Jan 29, 2015 9:35 am

Hello,

You should indeed use null points.
I see you want to consider your "zero" values as null points, I'm not sure if all of them or only some. But note there could be situations where a customer may expect other values to be considered as null points. That's why we lead the responsibility to mark the desired points as null points to the developer, using SetNull or AddNull functions.

In your case, if you want all your "zero" values to be marked as null points, you could run this:

Code: Select all

var i: Integer;
begin
  for i:=0 to Series1.Count-1 do
    if (Series1.YValues[i]=0) then
      Series1.SetNull(i);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Marco
Newbie
Newbie
Posts: 4
Joined: Mon Aug 18, 2014 12:00 am

Re: Dont link 'zero' point of a TLineSeries

Post by Marco » Fri Jan 30, 2015 2:13 pm

Thank you Yeray, Your solution works very fine for me !

Marco
Newbie
Newbie
Posts: 18
Joined: Thu Sep 27, 2007 12:00 am
Location: 73 Savoie, FRANCE

Re: Dont link 'zero' point of a TLineSeries

Post by Marco » Thu Feb 18, 2016 11:27 am

Hello Yeray,

I'm trying to use this SetNull() function on an old version of teechart (8.02) but it seems not working. Do you know if it a problem due to this version and solved after ?
Thanks for your reply.

Regards

Yeray
Site Admin
Site Admin
Posts: 8754
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Dont link 'zero' point of a TLineSeries

Post by Yeray » Thu Feb 18, 2016 12:34 pm

Hello,
Marco wrote:I'm trying to use this SetNull() function on an old version of teechart (8.02) but it seems not working. Do you know if it a problem due to this version and solved after ?
Looking at the release notes here I see this in v8.03:
3) [TV52010983]
Fixed bug : SetNull doesn't work properly
for FastLine Series. Setting the IgnoreNulls
property of FastLineSeries to false in
conjunction to TreatNulls property works
fine now (Series1.IgnoreNulls:=false;
Series1.TreatNulls:=tnDontPaint).
I also find several references to null points in that document.
Note v8.02 was superseded by v8.03 the May 2008; this is more than 7 years now...
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Marco
Newbie
Newbie
Posts: 18
Joined: Thu Sep 27, 2007 12:00 am
Location: 73 Savoie, FRANCE

Re: Dont link 'zero' point of a TLineSeries

Post by Marco » Thu Feb 18, 2016 1:08 pm

Thank you Yeray for your answer.

Post Reply