Hide line sections connecting to NULL points in line series

TeeChart for ActiveX, COM and ASP
Post Reply
cwJoe
Newbie
Newbie
Posts: 9
Joined: Thu Feb 23, 2006 12:00 am

Hide line sections connecting to NULL points in line series

Post by cwJoe » Wed Jul 12, 2006 6:28 pm

At one time we used a FastLine series type. Using that, points connecting to a point generated using AddNull or AddNullXY would not be visible. In other words, the FastLine series would have a break in the line where the NULL point exists. I see that the IgnoreNulls = True property causes this to occur for FastLine. I need to do the same thing for a Line series as opposed to FastLine. Can this be done? I tried SetNull, which did nothing, nor did PointColor=clNone.

What I did see with Line series is that we save the contents of the *.tee file in XML in base 64 format so we can rerun our report with changes mde via the chart editor settings that we save. Doing this somehow caused NULL points to not be visible with a break in the Line series, just as if we would have used IgnoreNulls with FastLine. Is this a bug, or is there some workaround that we can use for Line series?

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 Jul 13, 2006 10:12 am

Hi cwJoe,

It works fine for me here using a line series with TeeChart Pro v7.0.0.8 and this code:

Code: Select all

Private Sub Form_Load()
    With TChart1.Series(0)
        .Add 5, "", clTeeColor
        .Add 6, "", clTeeColor
        .AddNull ""
        .Add 8, "", clTeeColor
        .Add 9, "", clTeeColor
    End With
End Sub
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

cwJoe
Newbie
Newbie
Posts: 9
Joined: Thu Feb 23, 2006 12:00 am

Hiding sections of a Line series when a point is NULL.

Post by cwJoe » Thu Jul 13, 2006 1:41 pm

Thanks for the quick reply Narcis, but i am not sure I understand. Are you simply showing me that you can add NULL points? If that is the case, I do not have a problem adding NULL points. My problem is that I want to hide the line sections that connect between the NULL point and the points to the left and right of the NULL point. You supply a way to do it for FastLine but not for Line series. Do you need screenshots for me to show you what I mean? If so, how would I post screenshots? We are using your latest ActiveX version.

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 Jul 13, 2006 1:48 pm

Hi cwJoe,

Dropping a TeeChart control in a form, adding a line series and using the code I posted hides the lines connecting the left and right points to the NULL point. Doesn't it work for you? If so, could you please modify my code so that we can reproduce the problem here or send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments 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

cwJoe
Newbie
Newbie
Posts: 9
Joined: Thu Feb 23, 2006 12:00 am

Hiding NULL points and their connected lines in Line series

Post by cwJoe » Fri Jul 14, 2006 1:58 pm

Narcis,

I tried posting my files but continuously received a SERVER NOT FOUND error. Can I email the ZIP file to you directly? Our code is quite complicated. All our reports are generated by common code which uses each report's default from a *.tee file saved in XML in base 64. One file I will send will contain the 2 base 64 chart blobs that we use as default for the report whose *.tee file I will send. This file also includes code where we use .Add and .AddNull, but i assume it will not be useful to you. I will also attach the actual *.tee file for the report which when loaded will show a report having 2 NULL point that are NOT hidden. Can you tell me from this if there would be some code I can use when I write out the NULL points or after that to hide those line sections? We are limited to using these default chart blobs, although I can modify it with your chart editor and save it out again, if need be.

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

Post by Narcís » Fri Jul 14, 2006 3:25 pm

Hi cwJoe,

Ok, please send the files directly to me.

Thanks in advance.
Last edited by Narcís on Wed Oct 04, 2006 11:05 am, edited 1 time in total.
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 » Tue Jul 18, 2006 2:14 pm

Hi cwJoe,

Thanks for the files.

One way to do this could be changing null points to regular after the series is populated. Just change the color from clNone to SeriesColor:

Code: Select all

    TChart1.Series(0).PointColor(5) = TChart1.Series(0).Color
Another option is manually populate chart with AddXY method. You can check in OnAfterDraw event if point is null then change its color. If you want this to be fired the first time the form is displayed you'll need to call TChart1.Environment.InternalRepaint in Form's OnLoad event.

IgnoreNulls for line series is already on our wish-list to be considered for inclusion 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

Post Reply