XZ Grid with Y displacement
-
Anaesthesia
- Newbie

- Posts: 22
- Joined: Mon Aug 24, 2015 12:00 am
XZ Grid with Y displacement
I'm attempting to emulate the surface chart entitled "XZ Grid with Y displacement" from your gallery. I can't find it in your samples. I can reproduce the charting behaviour by activating Open GL, but then the axis labels are not shown properly (See above).
Can you help?
Can you help?
-
Anaesthesia
- Newbie

- Posts: 22
- Joined: Mon Aug 24, 2015 12:00 am
Re: XZ Grid with Y displacement
This illustrates the absence of labels with openGL. Also,how do I remove the dashed gray lines from the (invisible) left wall?
- Attachments
-
- OpenGL3D_2.jpg (483.36 KiB) Viewed 20545 times
-
Christopher
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: XZ Grid with Y displacement
Hello,
To make an image similar to this:

you can use the following code:
To make an image similar to this:

you can use the following code:
Code: Select all
Surface series;
private void InitializeChart()
{
series = new Surface(tChart1.Chart);
series.FillSampleValues();
tChart1.Aspect.Orthogonal = false;
tChart1.Legend.Visible = false;
tChart1.Aspect.Zoom = 95;
tChart1.Aspect.Elevation = 295;
tChart1.Aspect.Perspective = 20;
tChart1.Aspect.Chart3DPercent = 35;
}
Best Regards,
| Christopher Ireland / 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 |
-
Anaesthesia
- Newbie

- Posts: 22
- Joined: Mon Aug 24, 2015 12:00 am
Re: XZ Grid with Y displacement
I'm afraid I'm still having problems.
In the image above, the same chart (without series data) has been rendered with and without OpenGL active.
I commented in or out the code below to achieve this effect:
Steema.TeeChart.Drawing.GL.TeeOpenGL openGL = new Steema.TeeChart.Drawing.GL.TeeOpenGL(SurfaceChart.Chart);
openGL.Active = true;
openGL.ShadeQuality = true;
Can you please explain:
1. How I can remove the dashed gray lines which are positioned on the left and bottom axes?
2. How I can make the axis labelling visible in the OpenGL rendering?
3. How I can increase the font size of the axis labels (It seems to be stuck on 'Verdana 8') whatever I set in the property editor?
Many thanks,
Andy
In the image above, the same chart (without series data) has been rendered with and without OpenGL active.
I commented in or out the code below to achieve this effect:
Steema.TeeChart.Drawing.GL.TeeOpenGL openGL = new Steema.TeeChart.Drawing.GL.TeeOpenGL(SurfaceChart.Chart);
openGL.Active = true;
openGL.ShadeQuality = true;
Can you please explain:
1. How I can remove the dashed gray lines which are positioned on the left and bottom axes?
2. How I can make the axis labelling visible in the OpenGL rendering?
3. How I can increase the font size of the axis labels (It seems to be stuck on 'Verdana 8') whatever I set in the property editor?
Many thanks,
Andy
-
Christopher
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: XZ Grid with Y displacement
Hello,
Using this code:
I obtain the following images:
Can you please modify the above code so I can reproduce your issue here?
Using this code:
Code: Select all
Surface series;
Steema.TeeChart.Drawing.GL.TeeOpenGL openGL;
private void InitializeChart()
{
openGL = new Steema.TeeChart.Drawing.GL.TeeOpenGL(tChart1.Chart);
openGL.ShadeQuality = true;
series = new Surface(tChart1.Chart);
//series.FillSampleValues();
tChart1.Header.Text = "openGL.Active " + openGL.Active;
tChart1.Aspect.Orthogonal = false;
tChart1.Legend.Visible = false;
tChart1.Aspect.Zoom = 95;
tChart1.Aspect.Elevation = 295;
tChart1.Aspect.Perspective = 20;
tChart1.Aspect.Chart3DPercent = 35;
}
private void button4_Click(object sender, EventArgs e)
{
tChart1.Draw();
openGL.Active = !openGL.Active;
tChart1.Header.Text = "openGL.Active " + openGL.Active;
tChart1.Aspect.Zoom = openGL.Active ? 60 : 95;
}
Can you please modify the above code so I can reproduce your issue here?
Best Regards,
| Christopher Ireland / 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 |
-
Anaesthesia
- Newbie

- Posts: 22
- Joined: Mon Aug 24, 2015 12:00 am
Re: XZ Grid with Y displacement
Dear Christopher,
I've solved questions 1 and 2:
1. The gray lines are the Grid lines of the Depth Axis and are removed by setting Axes.Depth.Grid.Visible to false.
2. In my version of Teechart (Steema TeeChart for .NET Source Code 2015 4.1.2015.08060) changing the font in properties (eg Axes.Bottom.Labels.Font) does not work. By default, it is set to Verdana, 8pt and it reverts to this font whatever one chooses. However, changing it by code (eg Axes.Bottom.Labels.Font.Size = 14) works quite happily.
I still not able to work out how to position axis labels correctly when open GL is active. I suspect that the labels are being printed, but in a different orientation.
I note that in your own example, when OpenGL is active, the left and bottom axis zeroes are not shown either.
Andy
I've solved questions 1 and 2:
1. The gray lines are the Grid lines of the Depth Axis and are removed by setting Axes.Depth.Grid.Visible to false.
2. In my version of Teechart (Steema TeeChart for .NET Source Code 2015 4.1.2015.08060) changing the font in properties (eg Axes.Bottom.Labels.Font) does not work. By default, it is set to Verdana, 8pt and it reverts to this font whatever one chooses. However, changing it by code (eg Axes.Bottom.Labels.Font.Size = 14) works quite happily.
I still not able to work out how to position axis labels correctly when open GL is active. I suspect that the labels are being printed, but in a different orientation.
I note that in your own example, when OpenGL is active, the left and bottom axis zeroes are not shown either.
Andy
-
Christopher
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: XZ Grid with Y displacement
Hello Andy,
Unfortunately this is a defect which I have added to our tracking system with id=1302. Every effort will be made to find a fix to this defect before the next maintenance release. Apologies for any inconvenience in the meantime.Anaesthesia wrote:I still not able to work out how to position axis labels correctly when open GL is active. I suspect that the labels are being printed, but in a different orientation.
I note that in your own example, when OpenGL is active, the left and bottom axis zeroes are not shown either.
Best Regards,
| Christopher Ireland / 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 |
-
Anaesthesia
- Newbie

- Posts: 22
- Joined: Mon Aug 24, 2015 12:00 am
Re: XZ Grid with Y displacement
Thank you. - I'm still extremely pleased with the graphs I generate!
Andy
Andy
-
Christopher
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: XZ Grid with Y displacement
That's excellent, I'm very pleased to hear it.Anaesthesia wrote:Thank you. - I'm still extremely pleased with the graphs I generate!
I've now fixed the issue with the axis labels in OpenGL. It is a very simple fix, and if you have the source code version you may be interested in me passing it to you.
Best Regards,
| Christopher Ireland / 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 |
-
Anaesthesia
- Newbie

- Posts: 22
- Joined: Mon Aug 24, 2015 12:00 am
Re: XZ Grid with Y displacement
Dear Christopher,
I have the source code version. Could you let me know what to do?
Andy
I have the source code version. Could you let me know what to do?
Andy
-
Christopher
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: XZ Grid with Y displacement
Andy,
%Program Files%\Steema Software\Steema TeeChart for .NET Source Code 2015 4.1.2015.08060\Sources\TeeChart.OpenGL
and they are shown in the following two images:
Of course. There are two changes, both of them to the unit CanvasGL.cs under:Anaesthesia wrote:I have the source code version. Could you let me know what to do?
%Program Files%\Steema Software\Steema TeeChart for .NET Source Code 2015 4.1.2015.08060\Sources\TeeChart.OpenGL
and they are shown in the following two images:
Best Regards,
| Christopher Ireland / 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 |
-
Anaesthesia
- Newbie

- Posts: 22
- Joined: Mon Aug 24, 2015 12:00 am
Re: XZ Grid with Y displacement
When I replace the method (as shown below) and attempt to re-compile, I get:
Error 1 'Steema.TeeChart.Drawing.GL.GraphicsGL.TextOut(int, int, string, bool)': no suitable method found to override
Code Snippet:
//public override void TextOut(int x, int y, string text)
//{
// TextOut(x,y,0,text);
//}
public override void TextOut(int x, int y, string text, bool allowHtml)
{
TextOut(x, y, 0, text, false);
}
Error 1 'Steema.TeeChart.Drawing.GL.GraphicsGL.TextOut(int, int, string, bool)': no suitable method found to override
Code Snippet:
//public override void TextOut(int x, int y, string text)
//{
// TextOut(x,y,0,text);
//}
public override void TextOut(int x, int y, string text, bool allowHtml)
{
TextOut(x, y, 0, text, false);
}
-
Christopher
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: XZ Grid with Y displacement
In the second image I think one can see that the signature to override is slightly different, i.e.Anaesthesia wrote:When I replace the method (as shown below) and attempt to re-compile, I get:
Error 1 'Steema.TeeChart.Drawing.GL.GraphicsGL.TextOut(int, int, string, bool)': no suitable method found to override
Steema.TeeChart.Drawing.GL.GraphicsGL.TextOut(int, int, int, string, bool)
not
Steema.TeeChart.Drawing.GL.GraphicsGL.TextOut(int, int, string, bool)
Best Regards,
| Christopher Ireland / 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 |