Page 1 of 1

Dont link 'zero' point of a TLineSeries

Posted: Wed Jan 28, 2015 4:31 pm
by 16470019
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

Re: Dont link 'zero' point of a TLineSeries

Posted: Thu Jan 29, 2015 9:35 am
by yeray
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);

Re: Dont link 'zero' point of a TLineSeries

Posted: Fri Jan 30, 2015 2:13 pm
by 16470019
Thank you Yeray, Your solution works very fine for me !

Re: Dont link 'zero' point of a TLineSeries

Posted: Thu Feb 18, 2016 11:27 am
by 10546851
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

Re: Dont link 'zero' point of a TLineSeries

Posted: Thu Feb 18, 2016 12:34 pm
by yeray
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...

Re: Dont link 'zero' point of a TLineSeries

Posted: Thu Feb 18, 2016 1:08 pm
by 10546851
Thank you Yeray for your answer.