Strange! Series Labels overwrite the axis labels.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
HotSteemar
Newbie
Newbie
Posts: 9
Joined: Wed Nov 19, 2003 5:00 am

Strange! Series Labels overwrite the axis labels.

Post by HotSteemar » Thu Mar 03, 2005 4:00 pm

Hello,

I downloaded today the latest version of TeeChart for .NET.
I have been trying to set the labels along the series by
Series.Add( double x, double y, string label ).

The labels show up at each data point, but when this is done,
the X-axis value labels also change to the same text strings.
Am I doing it in a wrong way?

Best Regards,
HotSteemar

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 Mar 03, 2005 4:15 pm

Hi HotSteemar,
The labels show up at each data point, but when this is done,
the X-axis value labels also change to the same text strings.
Am I doing it in a wrong way?
Yes, what are you setting is the axis label and you may want to customize your series marks. In the code below I show how to customize both x-axis labels and series marks. For the marks you have to make them visible and implement the series GetMarkText event.

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{
			int i;
			
			Random y = new Random();

			for (i=0;i<10;i++)
				line1.Add(i,y.Next(),"Label "+i.ToString());

			line1.Marks.Visible=true;
		}

		private void line1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
		{
			e.MarkText="Mark "+e.ValueIndex.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

HotSteemar
Newbie
Newbie
Posts: 9
Joined: Wed Nov 19, 2003 5:00 am

Gracias. Series & axis labels are controled perfectly.

Post by HotSteemar » Thu Mar 03, 2005 4:54 pm

Narcis,

I implemented the series GetMarkText event handler to
draw the series labels. That worked fine!
Mucho Gracias.

Also, thank you very much for your prompt reply.

HotSteemar

Post Reply