Label on y axis in color grid series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Amol
Advanced
Posts: 176
Joined: Mon May 29, 2006 12:00 am

Label on y axis in color grid series

Post by Amol » Wed May 18, 2011 7:28 am

hi
I am working on color grid for heat map. I want to add label on y axis instead of value. i used add method with label but it adds this label on x axis but not in y axis.Attachment are also given for detail.
please give me some solution.


thanks
Attachments
image2.JPG
image2
image2.JPG (45.95 KiB) Viewed 5319 times
image1.JPG
image1
image1.JPG (49.75 KiB) Viewed 5308 times

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

Re: Label on y axis in color grid series

Post by Narcís » Fri May 20, 2011 1:19 pm

Hi Amol,

I'd expect the code below to work. However I've found labels are not painted so I added the issue (TF02015583) to the defect list to be investigated.

Code: Select all

        tChart1.Aspect.View3D = false;

        Steema.TeeChart.Styles.ColorGrid colorGrid1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);

        Random y = new Random();

        for (int x = 0; x < 10; x++)
        {
          for (int z = 0; z < 10; z++)
          {
            colorGrid1.Add(x, y.Next(), z, "row " + z.ToString());            
          }
        }

        tChart1.Axes.Left.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text;
In the meantime, as a workoarund, you can use custom labels like this:

Code: Select all

        tChart1.Aspect.View3D = false;

        Steema.TeeChart.Styles.ColorGrid colorGrid1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);
        Random y = new Random();

        for (int x = 0; x < 10; x++)
        {
          for (int z = 0; z < 10; z++)
          {
            colorGrid1.Add(x, y.Next(), z, "row " + z.ToString());
          }
        }

        tChart1.Axes.Left.Labels.Items.Clear();

        for (int i = 0; i < 10; i++)
        {
          tChart1.Axes.Left.Labels.Items.Add(i, "row " + i.ToString());
        }
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

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

Re: Label on y axis in color grid series

Post by Narcís » Tue Jun 14, 2011 2:09 pm

Hi Amol,

We have been investigating this issue and we found it's not a bug but a designed feature. 3D series won't automatically use text labels for the bottom axis if not set specifically. For displaying text labels in the left axis you should use custom labels as I already told you or GetAxisLabels event.
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