Page 1 of 1

Strange! Series Labels overwrite the axis labels.

Posted: Thu Mar 03, 2005 4:00 pm
by 8122852
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

Posted: Thu Mar 03, 2005 4:15 pm
by narcis
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();
		}

Gracias. Series & axis labels are controled perfectly.

Posted: Thu Mar 03, 2005 4:54 pm
by 8122852
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