Page 1 of 1
Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 1:15 pm
by 15048900
Good Morning,
I have been searching for two days now in code, in the debugger in the object, in the forums, and in the examples. Nothing I have found talks about a bubble in 3D space. When I try to do this with multiple series all the series are flat and fill no depth. I have tried every "depth" type property I can find and nothing makes the bubbles anything other than flat bubbles. Yah, if you look at them straight on they are drawn like bubble (which have a weird overlapping artifact but that will potentially be another thread) but when put in a 3D graph they are flat. Not only are they flat multiple series of the bubbles don't stretch across the entire z dimension. Instead they are all stacked (as flat objects stack) on one another in the middle of the z dimension.
Is what I am doing, balls in 3D space, not implemented?
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 1:46 pm
by 15048900
I should have said that I am trying to do this with points. Example code with a new project and a TChart added in design mode:
Code: Select all
Imports Steema.TeeChart
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
OneSeries(Color.Blue)
OneSeries(Color.Red)
OneSeries(Color.Green)
TChart1.Aspect.View3D = True
TChart1.Aspect.Orthogonal = False
TChart1.Aspect.Rotation = -87
End Sub
Private Sub OneSeries(seriesColor As Color)
Dim newSeries As Styles.Points3D = New Steema.TeeChart.Styles.Points3D
TChart1.Series.Add(newSeries)
For i = 1 To 10
newSeries.Add(i, i, seriesColor)
Next
newSeries.Marks.Visible = False
newSeries.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Sphere
newSeries.LinePen.Visible = False
End Sub
End Class
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 2:16 pm
by 15048900
Okay, I went back to using Points instead of Points3D:
Dim newSeries As Styles.Points = New Steema.TeeChart.Styles.Points
instead of:
Dim newSeries As Styles.Points3D = New Steema.TeeChart.Styles.Points3D
and now the z dimension depth of the series is okay, meaning the series are not all mushed together in the center of the z dimension, but the reason I was using Points3D so the points themselves could have depth. Of course, that is the other problem being that the points3D don't have any z dimension depth.
I guess if I could get the Points to have depth then that is fine as well or if the Points3D had depth themselves and the series of them have depth.
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 3:25 pm
by Christopher
Hello,
Are you sure Points3D is not what you want?
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = true;
tChart1.Aspect.Orthogonal = false;
tChart1.Aspect.Chart3DPercent = 60;
tChart1.Aspect.Zoom = 80;
Points3D series = new Points3D(tChart1.Chart);
series.FillSampleValues();
series.LinePen.Visible = false;
series.Pointer.Style = PointerStyles.Sphere;
series.Pointer.HorizSize = 30;
series.Pointer.VertSize = 30;
}
- 636105073632966488.jpg (81.86 KiB) Viewed 19489 times
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 6:16 pm
by 15048900
As I said, I am using Points3D and Sphere pointer style. If you look at the code I posted you will see that.
My two problems are:
1) Rotate the graph you created (maybe with the rotate tool) and you will see that the 3DPoints are flat. They have an x and y dimension but no z dimension. Hence flat!
2) Add another series. In my example code I show three series: Blue, Red, and Green. You will see that the 3dPoint multiple series overlap (and are flat so they overlap each other on the same z plane).
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 6:20 pm
by 15048900
Here, this is the size of your points with my three series.
I also added a rotate tool.
Code: Select all
Imports Steema.TeeChart
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
OneSeries(Color.Blue)
OneSeries(Color.Red)
OneSeries(Color.Green)
TChart1.Aspect.View3D = True
TChart1.Aspect.Orthogonal = False
End Sub
Private Sub OneSeries(seriesColor As Color)
TChart1.Aspect.View3D = True
TChart1.Aspect.Orthogonal = False
TChart1.Aspect.Chart3DPercent = 60
TChart1.Aspect.Zoom = 80
Dim newSeries As Styles.Points3D = New Steema.TeeChart.Styles.Points3D
TChart1.Series.Add(newSeries)
For i = 1 To 10
newSeries.Add(i, i, seriesColor)
Next
newSeries.Marks.Visible = False
newSeries.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Sphere
newSeries.Pointer.HorizSize = 30
newSeries.Pointer.VertSize = 30
newSeries.LinePen.Visible = False
TChart1.Tools.Add(New Steema.TeeChart.Tools.Rotate)
End Sub
End Class
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 6:27 pm
by 15048900
Attached is a snpashot of the three series which are red, blue, and green placed on the chart and then rotated with the rotate tool.
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 6:35 pm
by 15048900
If I modify the code above and replace Points3D with Points I get the series spread out along the Z plane but the points are still flat.
The Points series was what I started with and noticed that the points had no Z-dimension. I switched over to Points3D and it got worse because the points don't have a Z-Dimension size nor are they distributed along the Z axis.
Re: Bubbles are not bubbles in 3D
Posted: Mon Sep 26, 2016 8:37 pm
by Christopher
Hello,
biqpaulson wrote:The Points series was what I started with and noticed that the points had no Z-dimension.
I see the issue now, apologies for not catching it the first time round. By default, TeeChart uses the default Windows Forms GDI+ canvas to render, and this canvas is not a 3D canvas. We do have a 3D canvas, however, an OpenGL canvas, a working example of which you can find on your harddisk under:
D:\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2016 4.1.2016.05120\Examples\OpenGLProject\bin\ExecutableDemo\OpenGLDemo.exe
By adding TeeChart.OpenGL.dll to your project, you should be able to achieve something like this:
Code: Select all
TeeOpenGL openGL;
private void InitializeChart()
{
openGL = new TeeOpenGL(tChart1.Chart);
openGL.Active = true;
openGL.AmbientLight = 50;
tChart1.Aspect.View3D = true;
tChart1.Aspect.Chart3DPercent = 60;
tChart1.Aspect.Zoom = 50;
Points3D series = new Points3D(tChart1.Chart);
series.FillSampleValues();
series.LinePen.Visible = false;
series.Pointer.Style = PointerStyles.Sphere;
series.Pointer.HorizSize = 30;
series.Pointer.VertSize = 30;
tChart1.Tools.Add(typeof(Rotate));
}
- bubble.PNG (54.69 KiB) Viewed 19451 times
Re: Bubbles are not bubbles in 3D
Posted: Tue Sep 27, 2016 1:00 pm
by 15048900
After lots of testing with the opengl library I cannot get what you have.
1) All I get is a big red X where the graph belongs if I use either Sphere or PolishedSphere. No exceptions in the Output window or any indication that there was a problem.
2) Nothing is 3D except for the Circle (funny that a circle is actually a sphere using the opengl library with Points3D and Points but the Sphere and PolishedSphere do not work).
3) Using the circle PointerStyle and Points3D Style I still get overlapping series in the Z-Axis. Using circle PointerStyle and Points I get the series spread over the Z-Axis appropriately.
4) Now no coloring of the "circles" work.
Code: Select all
Imports Steema.TeeChart
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
DrawSeries(TChart1)
DrawSeries(TChart2)
DrawSeries3D(TChart3)
DrawSeries3D(TChart4)
End Sub
Private Sub FormatChart(chartToFormat As TChart)
chartToFormat.Aspect.View3D = True
chartToFormat.Aspect.Orthogonal = False
chartToFormat.Aspect.Chart3DPercent = 60
chartToFormat.Aspect.Zoom = 80
chartToFormat.Tools.Add(New Steema.TeeChart.Tools.Rotate)
End Sub
Private Sub DrawSeries(chartToDraw As TChart)
FormatChart(chartToDraw)
OneSeries(chartToDraw, Color.Blue)
OneSeries(chartToDraw, Color.Red)
OneSeries(chartToDraw, Color.Green)
End Sub
Private Sub DrawSeries3D(chartToDraw As TChart)
FormatChart(chartToDraw)
OneSeries3D(chartToDraw, Color.Blue)
OneSeries3D(chartToDraw, Color.Red)
OneSeries3D(chartToDraw, Color.Green)
End Sub
Private Sub OneSeries(chartToAddTo As TChart, seriesColor As Color)
Dim newSeries As Styles.Points = New Steema.TeeChart.Styles.Points
chartToAddTo.Series.Add(newSeries)
newSeries.Color = seriesColor
For i = 1 To 10
newSeries.Add(i, i, seriesColor)
Next
newSeries.Pointer.HorizSize = 10
newSeries.Pointer.VertSize = 10
newSeries.LinePen.Visible = False
newSeries.Marks.Visible = False
newSeries.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
newSeries.Pointer.HorizSize = 10
newSeries.Pointer.VertSize = 10
newSeries.LinePen.Visible = False
End Sub
Private Sub OneSeries3D(chartToAddTo As TChart, seriesColor As Color)
Dim newSeries As Styles.Points3D = New Steema.TeeChart.Styles.Points3D
chartToAddTo.Series.Add(newSeries)
newSeries.Color = seriesColor
For i = 1 To 10
newSeries.Add(i, i, seriesColor)
Next
newSeries.Pointer.HorizSize = 10
newSeries.Pointer.VertSize = 10
newSeries.LinePen.Visible = False
newSeries.Marks.Visible = False
newSeries.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
newSeries.Pointer.HorizSize = 10
newSeries.Pointer.VertSize = 10
newSeries.LinePen.Visible = False
End Sub
End Class
Re: Bubbles are not bubbles in 3D
Posted: Tue Sep 27, 2016 1:18 pm
by 15048900
Oh, I should add another item. The drawing using the OpenGL library is the worse I have seen. Not only do the balls (albeit from circle styles) look not very good but the lines on the graph are just plain horrid.
Re: Bubbles are not bubbles in 3D
Posted: Tue Sep 27, 2016 1:52 pm
by Christopher
biqpaulson wrote:Oh, I should add another item. The drawing using the OpenGL library is the worse I have seen. Not only do the balls (albeit from circle styles) look not very good but the lines on the graph are just plain horrid.
I agree that the quality of TeeChart's OpenGL output could be substantially improved. I will say that part of the reason little time has been dedicated to this part of the TeeChart.NET project is because we have had very little demand for OpenGL in the last five years or so, I can't remember any of our clients asking for improvements in this area. Anyhow, I have added this as a ticket to our issue tracker with
id=1642 and will also comment on this to the product manager.