Page 1 of 1

Using MarkTips in TeeChart to display Z axis coordinate

Posted: Tue Aug 21, 2007 11:05 am
by 13045524
[b]Hi

I want to know how to use MarkTips to show the Z axis coordinate.
We can use
Steema.TeeChart.Styles.MarksStyles.XY
to display X and Y coordinates. But what about the Z axis coordinate in case of surface graph.

Thanks
Swati [/b]

Posted: Tue Aug 21, 2007 11:31 am
by narcis
Hi Swati,

In that case you can combine MarkTips' GetText event and chart's MouseMove event as in here:

Code: Select all

		private int ValueIndex = -1;

		private void tChart1_MouseMove(object sender, MouseEventArgs e)
		{
			ValueIndex = surface1.Clicked(e.X, e.Y);
		}

		private void marksTip1_GetText(Steema.TeeChart.Tools.MarksTip sender, Steema.TeeChart.Tools.MarksTipGetTextEventArgs e)
		{
			if (ValueIndex != -1)
			{
				e.Text = surface1.ZValues[ValueIndex].ToString();
			}
		}