Page 1 of 1

Label on y axis in color grid series

Posted: Wed May 18, 2011 7:28 am
by 9641422
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

Re: Label on y axis in color grid series

Posted: Fri May 20, 2011 1:19 pm
by narcis
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());
        }

Re: Label on y axis in color grid series

Posted: Tue Jun 14, 2011 2:09 pm
by narcis
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.