AxisLabelStyle question

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
David
Newbie
Newbie
Posts: 4
Joined: Wed Nov 12, 2003 5:00 am
Location: Sweden

AxisLabelStyle question

Post by David » Thu Dec 04, 2003 10:23 am

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.

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Dec 04, 2003 12:07 pm

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

Post Reply