Page 1 of 1

AxisLabelStyle question

Posted: Thu Dec 04, 2003 10:23 am
by 8122763
Hello.

I have a chart which contains severeal different Series (Line, HighLow, etc) and I want to change the bottom axislabels from displaying 0,1,2...

When I set the AxisLabelStyle to Text atleast the numbering disapperad, but I do not understand how to set the text. In the helpfile I can read that the texts are collected from Series.XLabels, but this property I do not find anywhere. Also, which serie's text is it that will show on the labels? It can't be all of them, right?

Code I used:
chartCtrl.Axes.Bottom.Labels.Style = AxisLabelStyle.Text

Thanks!
/David.

Posted: Thu Dec 04, 2003 12:07 pm
by Pep
Hi David,

>but I do not understand how to set the text. In the helpfile I can read >that the texts are collected from Series.XLabels, but this property I do

You can add the XLabels using the Add method like :
line.Add(value,"label");

or use an array of string which contains the labels and assign it to the series labels like :

Code: Select all

      string[] labelStr = new string[] {"a","b","c","d","e"};
      Steema.TeeChart.Styles.StringList labels = new Steema.TeeChart.Styles.StringList(5);
      labels.AddRange(labelStr);
      int[] values = new int[] {1, 2, 3, 4, 5,};
      line1.Add(values);
      line1.Labels = labels;
>not find anywhere. Also, which serie's text is it that will show on the >labels? It can't be all of them, right?

No, if you set the Bottom axis labels style to Text will show the labels of the series which contains labels, if both of the series contains XLabels then you have to use the Axis events to customize the labels you want to show.

Josep Lluis Jorge
http://support.steema.com