Query on Line Series Marks

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
spacemanspiff
Newbie
Newbie
Posts: 10
Joined: Fri Jul 02, 2004 4:00 am
Contact:

Query on Line Series Marks

Post by spacemanspiff » Tue Aug 23, 2005 9:50 am

Hi,

I have a line series with more than 10000 data points. The following is my requirement: As the mouse cursor is moved over the line series, the marks (tooltip) should be visible only for that point where the mouse is stationary.

For example: If the mouse is moved over (500, 45.5), there should be a tooltip kind of thing which displays 500, 45.5

I tried the following:
line.Marks.Style = Steema.TeeChart.Styles.MarksStyles.XY;

and a tChart_MouseMove event where I set:
line.Marks.Visible = true;

But the problem with this is that this displays the tooltip for the whole line graph. And since I have more than 10000 data points, the graph looks very very cluttered. The requirement is that the marks should be displayed only for that point where the mouse is moved.

Any help on this will be appreciated.

Thanks,
Spacemanspiff

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 23, 2005 11:03 am

Hi Spacemanspiff,

To get what you request you should better use a MarkTips tool instead of marks as you are currently using. MarkTips only displays a mark for the value where the mouse is over. For information about this tool please have a look at the tutorials and features demo available at the TeeChart program group.
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

spacemanspiff
Newbie
Newbie
Posts: 10
Joined: Fri Jul 02, 2004 4:00 am
Contact:

Post by spacemanspiff » Tue Aug 23, 2005 11:50 am

Hi,

Thanks a lot for the help ! Solved a lot of my problems.

Just another question though: Is there a way to customize the text that is displayed via the MarksTip ? Can I use the line.GetSeriesMark event to customize the text? I would like to display a string and a comma between the X and the Y values displayed in the tooltip. Any suggestions ?

Thanks,
spacemanspiff

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 23, 2005 11:58 am

Hi Spacemanspiff,

MarkTips tool has its own GetText event, use it to customize the text.
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

spacemanspiff
Newbie
Newbie
Posts: 10
Joined: Fri Jul 02, 2004 4:00 am
Contact:

Post by spacemanspiff » Tue Aug 23, 2005 12:37 pm

Hi,

Thanks again ! But can you please elaborate as to how can I customize the text with the GetText event ? I was unable to find out any means to get the X and the Y axis values that the mouse is currently pointing to.

Thanks,
Spacemanspiff

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 23, 2005 12:56 pm

Hi Spacemanspiff,

Yes, you should set MarksTip tool as here:

Code: Select all

	this.marksTip1.Style=Steema.TeeChart.Styles.MarksStyles.XY;
and then customize the text at the GetText event doing something like:

Code: Select all

		private void marksTip1_GetText(Steema.TeeChart.Tools.MarksTip sender, Steema.TeeChart.Tools.MarksTipGetTextEventArgs e)
		{
			e.Text=e.Text.Replace(" ",", ");
		}
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

spacemanspiff
Newbie
Newbie
Posts: 10
Joined: Fri Jul 02, 2004 4:00 am
Contact:

Post by spacemanspiff » Tue Aug 23, 2005 1:06 pm

Hi,

Thanks a lot once again ! It was really helpful.

Thanks,
Spacemanspiff

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 23, 2005 1:30 pm

You're welcome! I'm glad to hear it helped :wink:.
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