Rotate Labels in 3D Graph

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
lilo
Newbie
Newbie
Posts: 29
Joined: Thu Sep 30, 2010 12:00 am

Rotate Labels in 3D Graph

Post by lilo » Thu Aug 25, 2011 3:15 am

Hi,

Does the latest release have the ability to rotate text labels in the 3D Charts?

lilo
Newbie
Newbie
Posts: 29
Joined: Thu Sep 30, 2010 12:00 am

Re: Rotate Labels in 3D Graph

Post by lilo » Thu Aug 25, 2011 4:57 am

I am referring to annotation text when the 3D chart is rotated with the rotate tool

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Rotate Labels in 3D Graph

Post by Sandra » Fri Aug 26, 2011 1:31 pm

Hello lilo,

You can achieve that annotation rotate in XY plan, using OpenGL as do in next simple example of code:

Code: Select all

 public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
      Steema.TeeChart.Styles.Line line;
      Steema.TeeChart.Tools.Annotation annotation;
      Steema.TeeChart.Tools.Rotate rotate; 
      private void InitializeChart()
      {
          line = new Line(tChart1.Chart);
          line.FillSampleValues();

          rotate = new Steema.TeeChart.Tools.Rotate(tChart1.Chart);
          //Open GL
          Steema.TeeChart.Drawing.GL.TeeOpenGL openGL = new Steema.TeeChart.Drawing.GL.TeeOpenGL(tChart1.Chart);
          openGL.Active = true;
          openGL.ShadeQuality = true;

          tChart1.Walls.Back.Visible = false;
          tChart1.Axes.Bottom.Labels.Font.Size = 10;
          tChart1.Axes.Left.Labels.Font.Size = 10;
          tChart1.Axes.Left.Labels.Font.Bold = true;
          tChart1.Axes.Bottom.Labels.Font.Bold = true;

          tChart1.Aspect.Rotation = 0;
          tChart1.Aspect.Elevation = 361;
          //Anotation
          annotation.Text = "TeeChart.Net";
          annotation.Shape.Font.Size = 12;
          annotation = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
          annotation.Left = 250;
          annotation.Top = 250;
      }
Remember that you need add in the folder reference of your application, the assemblies, TeeChart.dll and TeeChart.OpenGL.dll. On the other hand, please can you tell us, if previous code works as you expected?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

lilo
Newbie
Newbie
Posts: 29
Joined: Thu Sep 30, 2010 12:00 am

Re: Rotate Labels in 3D Graph

Post by lilo » Mon Aug 29, 2011 2:12 am

Yes, this works, thanks.

Post Reply