Hide line sections where X or Y value is Zero(0)in XY Chart

TeeChart for ActiveX, COM and ASP
Post Reply
Faizullah Khan
Newbie
Newbie
Posts: 50
Joined: Wed Apr 26, 2006 12:00 am

Hide line sections where X or Y value is Zero(0)in XY Chart

Post by Faizullah Khan » Fri Jul 14, 2006 5:16 am

Hi

Is it possible that we hide the section of line where X or Y point value
is Zero (0) . kindly help me in this regard.

VB 6.0
TeeChart v7

Thanks & Regards

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 7:38 am

Hi Faizullah,

You can try doing something like this:

Code: Select all

Private Sub AddValue(X As Double, Y As Double)
    If ((X = 0) Or (Y = 0)) Then
        TChart1.Series(0).AddXY X, Y, "", clNone
    Else
        TChart1.Series(0).AddXY X, Y, "", clTeeColor
    End If
End Sub

Private Sub Form_Load()
    TChart1.AddSeries scLine
    
    AddValue -2, 6
    AddValue -1, 2
    AddValue 0, 3
    AddValue 1, 5
    AddValue 2, 0
    AddValue 3, 8
    AddValue 4, 4
    AddValue 5, 0
    AddValue 6, 2
End Sub
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

Faizullah Khan
Newbie
Newbie
Posts: 50
Joined: Wed Apr 26, 2006 12:00 am

Post by Faizullah Khan » Tue Aug 01, 2006 6:25 am

Hi

Thanks it works fine.

How we check the property of point e.g. At Run time We want to show

the point that is already marked as " clNone " or We want to assign "clNone" property to another point.

Thanks & Regards

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Aug 01, 2006 9:00 am

Hi,

you can use the PointColor property :

TChart1.Series(0).PointColor(Index) = clNone

Faizullah Khan
Newbie
Newbie
Posts: 50
Joined: Wed Apr 26, 2006 12:00 am

Post by Faizullah Khan » Wed Aug 02, 2006 7:40 am

Hi

Thanks for timely responce

This code works fine

Thanks & Regards

Post Reply