3D Point and the Zvalues

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Adrian
Newbie
Newbie
Posts: 13
Joined: Fri Dec 10, 2004 5:00 am
Location: Canberra Australia
Contact:

3D Point and the Zvalues

Post by Adrian » Tue Dec 21, 2004 6:10 am

I'm trying to establish a 3D point chart from data stored in a database but I can't find how to set the ZVALUES.

For the X and Y I use

Code: Select all

 m_series.YValues.DataMember = txtA.Text
 m_series.XValues.DataMember = txtB.Text
where the text boxes contain the names of my columns. Is there an equivelent method for setting the Z values for these type of 3D charts?

Cheers..

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Dec 21, 2004 8:01 am

Hi, Adrian.

If series has x,y and z values, then you can use the following code:

Code: Select all

      points3D1.ZValues.DataMember = txtZ.Text;
      points3D1.XValues.DataMember = txtX.Text;
      points3D1.YValues.DataMember = txtY.Text;
Marjan Slatinek,
http://www.steema.com

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

Post by Pep » Tue Dec 21, 2004 10:41 am

Hi Adrian,

in case you've created the Series at runtime you can do :

Code: Select all

(tChart1.Series[0] as Steema.TeeChart.Styles.Waterfall).ZValues.DataMember = "sss";

Adrian
Newbie
Newbie
Posts: 13
Joined: Fri Dec 10, 2004 5:00 am
Location: Canberra Australia
Contact:

Post by Adrian » Tue Dec 21, 2004 10:06 pm

Thanks Pep, Marjan for your responses,
I must be missing something here though, I think your solutions work for the ActiveX version but not the DOTNET version of Teechart.

I am using TeeChart for .Net and am building the series dynamically using code simmilar to the following.

Code: Select all

            If IsNothing(m_series) Then
                  Me.m_series = m_tc.Series.Add(New Steema.TeeChart.Styles.Area)
               End If
               m_series.YValues.DataMember = txtA.Text
               m_series.XValues.DataMember = txtB.Text
               m_series.LabelMember = txtC.Text

               If Me.chkDateTimeA.Checked Then
                  m_series.YValues.DateTime = True
               End If

               If Me.chkDateTimeB.Checked Then
                  m_series.XValues.DateTime = True
               End If
This example creates an AREA series; I can create sucesfully all 2 dimentional series using similar code.

However where the series have a Z value I can't find a way to reference it. If I use you example Pep, It gets a syntax error on the opening bracket, I do remember using syntax similar to this in the ActiveX version though. Your example Marjan is how I think it should work but I don't think the ZVALUES property is exposed correctly.

Any ideas?

Cheers

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

Post by Pep » Tue Dec 28, 2004 1:18 am

Hi Adrian,

which Series type are you using ? Are you using a 3D Series (the Area is not a 3D Series type) ?
If so, you should be able to do something like the following :

Code: Select all

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim m_series As New Steema.TeeChart.Styles.Points3D
        m_series.FillSampleValues()
        m_tc.Series.Add(m_series)
        m_series.ZValues.DateTime = True
    End Sub
The code I sent to you before was in C#, not in VB.Net.

Post Reply