Page 1 of 1

How to display pointers only selected points on the series?

Posted: Thu Feb 09, 2006 7:27 am
by 9788742
I have a form which has t-chart control on it.
And i have added a line series to the t-chart control and added few points in the line series.

Now i have a requirement to show pointers for couple of points on the series.
By doing
this.line1.Pointer.Visible = true;
This will display pointers for all the points on the series.

Posted: Thu Feb 09, 2006 10:34 am
by narcis
Hi Lakshmi,

Yes, you can easily do that using the OnGetPointerStyle event as shown here:

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{
			line1.FillSampleValues();

			line1.Pointer.Visible=true;
		}

		private void line1_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventArgs e)
		{
			if (series.YValues[e.ValueIndex]%2==0)
			{
				e.Style=Steema.TeeChart.Styles.PointerStyles.Nothing;
			}
		}