I add a chart
add a 3d surface plot
in a button click event
I process the following code
Dim a As Integer
Dim b As Integer
Dim c As Integer
For a = 0 To 9
For b = 0 To 9
For c = 0 To 9
TChart1.Series(0).Add(a, b, c)
Next
Next
Next
I get no plot. I made no changes to the chart other than adding a 3d surface series.
any ideas what I am doing wrong
Have a problem with 3d surface plot in .net 2003
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
This is because you should type cast the series so that an Add(X,Y,Z) method for surface series is recognised.
However, please notice that surface series need to have a grid structure where columns are defined by x values, rows by z values and each cell value is defined by y values. If x and z values are not equidistant you should also set the IrregularGrid property to true. According to this the working code could be something like this:
This is because you should type cast the series so that an Add(X,Y,Z) method for surface series is recognised.
However, please notice that surface series need to have a grid structure where columns are defined by x values, rows by z values and each cell value is defined by y values. If x and z values are not equidistant you should also set the IrregularGrid property to true. According to this the working code could be something like this:
Code: Select all
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As Integer
'Dim b As Integer
Dim c As Integer
Dim b As New Random
For a = 0 To 9
'For b = 0 To 9
For c = 0 To 9
Surface1.Add(a, b.Next(), c)
'or
'CType(TChart1.Series(0), Steema.TeeChart.Styles.Surface).Add(a, b.Next(), c)
Next
'Next
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 |
Instructions - How to post in this forum |