Unable to change fontsize in the depth axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Sinais
Newbie
Newbie
Posts: 5
Joined: Fri May 19, 2006 12:00 am
Location: Galicia, Spain

Unable to change fontsize in the depth axis

Post by Sinais » Wed Jul 12, 2006 5:15 pm

I am unable to change the fontsize in the depth axis of a Waterfall 3D series changing the property:
Steema.Teechart.DepthAxis.Labels.Font.Size

Is that a bug?

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 » Thu Jul 13, 2006 10:25 am

Hi inma,

It works fine here using latest TeeChart for .NET v2 version and this code:

Code: Select all

      tChart1.Axes.Depth.Visible = true;
      tChart1.Axes.Depth.Labels.Font.Size = 12;

      tChart1.Axes.DepthTop.Visible = true;
      tChart1.Axes.DepthTop.Labels.Font.Size = 12;
Which TeeChart version are you using?
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

Sinais
Newbie
Newbie
Posts: 5
Joined: Fri May 19, 2006 12:00 am
Location: Galicia, Spain

Post by Sinais » Thu Jul 13, 2006 11:27 am

Hi Narcis,

Your code works fine, but my problem comes up loading custom labels. I have the latest TeeChart for .NET v2 version:

The following code adds some labels to the depth axis and tries to change the font size, but doesn't work:

Code: Select all

			double[] x = new double[] { 1, 2, 1, 2 };
			double[] y = new double[] { 1, 1, 2, 2 }; 
			double[] z = new double[] { 1, 1, 2, 2 };
			double[] Zpoints = new double[] { 1, 2 };
			string[] Zlabels = new string[] { "a", "b" };

			Waterfall series = new Waterfall();
			tChart1.Series.Add(series);
			series.Add(x, y, z);

			for (int i = 0; i < Zpoints.Length; i++)
				tChart1.Axes.Depth.Labels.Items.Add(Zpoints[i], Zlabels[i]);

			tChart1.Axes.Depth.Visible = true; 
			tChart1.Axes.Depth.Labels.Visible = true;
			tChart1.Axes.Depth.Labels.Font.Size = 26;
Thanks for your help,

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 Jul 13, 2006 1:26 pm

Hi inma,

Ok, when using custom labels you need to add them as shown here:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      double[] x = new double[] { 1, 2, 1, 2 };
      double[] y = new double[] { 1, 1, 2, 2 };
      double[] z = new double[] { 1, 1, 2, 2 };
      double[] Zpoints = new double[] { 1, 2 };
      string[] Zlabels = new string[] { "a", "b" };

      Waterfall series = new Waterfall();
      tChart1.Series.Add(series);
      series.Add(x, y, z);

      for (int i = 0; i < Zpoints.Length; i++)
        tChart1.Axes.Depth.Labels.Items.Add(Zpoints[i], Zlabels[i]).Font.Size=26;

      tChart1.Axes.Depth.Visible = true;
      tChart1.Axes.Depth.Labels.Visible = true;
      //tChart1.Axes.Depth.Labels.Font.Size = 26; 
    }
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

Sinais
Newbie
Newbie
Posts: 5
Joined: Fri May 19, 2006 12:00 am
Location: Galicia, Spain

Post by Sinais » Fri Jul 14, 2006 9:03 am

Thanks a million.

Post Reply