Using MarkTips in TeeChart to display Z axis coordinate

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
NY
Newbie
Newbie
Posts: 5
Joined: Thu Jun 14, 2007 12:00 am

Using MarkTips in TeeChart to display Z axis coordinate

Post by NY » Tue Aug 21, 2007 11:05 am

[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]

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Aug 21, 2007 11:31 am

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();
			}
		}
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

Post Reply