Page 1 of 1
3D Point and the Zvalues
Posted: Tue Dec 21, 2004 6:10 am
by 8128237
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..
Posted: Tue Dec 21, 2004 8:01 am
by Marjan
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;
Posted: Tue Dec 21, 2004 10:41 am
by Pep
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";
Posted: Tue Dec 21, 2004 10:06 pm
by 8128237
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
Posted: Tue Dec 28, 2004 1:18 am
by Pep
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.