two charts on website - loading data from first to second

TeeChart for ActiveX, COM and ASP
Post Reply
adenin
Newbie
Newbie
Posts: 33
Joined: Mon Jun 11, 2007 12:00 am

two charts on website - loading data from first to second

Post by adenin » Wed Aug 27, 2008 7:48 am

Hello,

I have specific question;
I would like to have two charts on website,
1st is 3D chart.
problem is how to draw
the second one as 2D - slice of the first (for specific value on one axis)

I would like to do that on client side - because of speed - if it is possible.

thanks

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

Post by Narcís » Wed Aug 27, 2008 7:59 am

Hello adenin,

Yes, you can do something like this:

Code: Select all

Private Sub Form_Load()
    TeeCommander1.Chart = TChart1
    TeeCommander2.Chart = TChart2
    
    TChart1.AddSeries scSurface
    TChart1.Series(0).FillSampleValues 10
    TChart1.Legend.Visible = False
    
    TChart2.AddSeries scLine
    TChart2.Series(0).asLine.Pointer.Visible = True
    
    For i = 0 To TChart1.Series(0).Count - 1
        'Draw 6th row
        If TChart1.Series(0).asSurface.ZValues.Value(i) = 5 Then
            TChart2.Series(0).AddXY TChart1.Series(0).XValues.Value(i), _
                                    TChart1.Series(0).YValues.Value(i), _
                                    "", clTeeColor
        End If
    Next
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

adenin
Newbie
Newbie
Posts: 33
Joined: Mon Jun 11, 2007 12:00 am

Post by adenin » Thu Aug 28, 2008 8:09 am

thanks,

it works exactly like I want

Post Reply