Page 1 of 1

Query on Line Series Marks

Posted: Tue Aug 23, 2005 9:50 am
by 8126031
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

Posted: Tue Aug 23, 2005 11:03 am
by narcis
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.

Posted: Tue Aug 23, 2005 11:50 am
by 8126031
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

Posted: Tue Aug 23, 2005 11:58 am
by narcis
Hi Spacemanspiff,

MarkTips tool has its own GetText event, use it to customize the text.

Posted: Tue Aug 23, 2005 12:37 pm
by 8126031
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

Posted: Tue Aug 23, 2005 12:56 pm
by narcis
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(" ",", ");
		}

Posted: Tue Aug 23, 2005 1:06 pm
by 8126031
Hi,

Thanks a lot once again ! It was really helpful.

Thanks,
Spacemanspiff

Posted: Tue Aug 23, 2005 1:30 pm
by narcis
You're welcome! I'm glad to hear it helped :wink:.