3D Bubble Series? Or Point3D with cylinders?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
mweaver
Newbie
Newbie
Posts: 11
Joined: Wed Jun 22, 2005 4:00 am

3D Bubble Series? Or Point3D with cylinders?

Post by mweaver » Wed Apr 05, 2006 4:32 am

I'm using TeeChart .NET v2 and I need to create a chart that looks like this:

Image

I can use the SurfacePlot series to do the colored surface, but I haven't figured out how to do the 3D cylinders. Each cylindar represents a X,Y,Z, where the height of the cylinder is the Z value. So, it is the same data as a Bubble series, only instead of the Z value being the radius of the circle, its the height of the cylinders. Its also the same as a Point3D series, but I need to draw the entire cylinder (down to 0 point on axis), not just the point.

Any suggestions on how this could be done?

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 Apr 05, 2006 8:00 am

Hi mweaver,

I think the best option here is using a Tower series setting its style to a cylinder. Tower series has X, Y and Z values. Y value determines the tower height and color.
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

mweaver
Newbie
Newbie
Posts: 11
Joined: Wed Jun 22, 2005 4:00 am

Post by mweaver » Thu Apr 06, 2006 4:04 am

Thanks, I've been playing with the Tower series and I think it will do most of what I need to do. Here is the sample code I'm using:

Code: Select all


		Dim surface As New Steema.TeeChart.Styles.Surface(Me.tChart.Chart)
		With surface
			.IrregularGrid = True
			.UseColorRange = True
			.Add(1, 1, 1)
			.Add(1, 4, 20)
			'.Add(10, 6, 10)
			.Add(20, 1, 1)
			.Add(20, 3, 20)
		End With
		Me.tChart.Series.Add(surface)

		Dim tower As New Steema.TeeChart.Styles.Tower(Me.tChart.Chart)
		With tower
			.TowerStyle = Steema.TeeChart.Styles.TowerStyles.Cylinder
			.IrregularGrid = True
			.UseOrigin = True
			.Add(2, 9.5, 4)
			.Add(6, 12.8, 19)
			.Add(16, 6.2, 12)
			'.Add(85, 16.1, 10)
		End With
		Me.tChart.Series.Add(tower)

		With Me.tChart.Axes.Left
			.AutomaticMinimum = False
			.Minimum = 0
		End With

		Me.tChart.Walls.Visible = True

		Me.tChart.Aspect.View3D = True
		Me.tChart.Legend.Visible = False
		Me.tChart.Aspect.Chart3DPercent = 50
		Me.tChart.Walls.Back.Transparent = True
		Me.tChart.Walls.Left.Transparent = True
		Me.tChart.Walls.Bottom.Transparent = True

		Me.tChart.Aspect.Orthogonal = True

		Me.tChart.Axes.Depth.Visible = True
		Me.tChart.Axes.Depth.Grid.Visible = False
It kind of works, but I have a few questions:

(1) The cylinders are not round, they are oval shape. How can I control the diameter/radius of the cylinders?

(2) The surface series doesn't always hide the cylinders as expected. If you rotate the chart around, there are several viewing angles where the surface plot should be hiding the bottom part of the cylinder, but it doesn't. Any suggestions?

Thanks.[/list]

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

Post by Narcís » Thu Apr 06, 2006 11:53 am

Hi mweaver,

Code: Select all

(1) The cylinders are not round, they are oval shape. How can I control the diameter/radius of the cylinders?
We are conscious that some work needs to be done here but for now there are a couple of ways to achieve what you request. Those solutions are setting Chart3DPercent to 100 or setting tower's PercentWidth to 50

Code: Select all

(2) The surface series doesn't always hide the cylinders as expected. If you rotate the chart around, there are several viewing angles where the surface plot should be hiding the bottom part of the cylinder, but it doesn't. Any suggestions?


I've been able to reproduce the problem here. To have this working you need to use Open GL. Steema Software designed Open GL rendering to solve cases like that.
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

Post Reply