Point Line Chart Tooltip

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

Point Line Chart Tooltip

Post by Felix » Tue Jul 01, 2014 9:37 am

Hello Pasi,

how can I implement a tooltip at Point Line Chart?
When I take the mouse to a point, I want to view information from this point.

In a IntensityGridSeries I could use the Event "MouseTraceCellChanged".
PointLineChart.PNG
PointLineChart.PNG (13.95 KiB) Viewed 7886 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Point Line Chart Tooltip

Post by ArctionPasi » Tue Jul 01, 2014 10:21 am

Please follow the "Scatter, point tracking" or "Cursor tracking" example.
LightningChart Support Team, PT

Felix
Posts: 72
Joined: Tue Oct 29, 2013 8:10 am

Re: Point Line Chart Tooltip

Post by Felix » Tue Jul 01, 2014 2:30 pm

Hello Pasi,

this works fine, but I want to get a value only when I am on the point.

Code: Select all

private void MouseMove(object sender, MouseEventArgs e)
{
	foreach (var pointLine in chart.ViewXY.PointLineSeries)
	{
		int iNearestIndex;
		double dXValue, dYValue;

		if (pointLine.SolveNearestDataPointByCoord(e.X, e.Y, out dXValue, out dYValue, out iNearestIndex))
		{
			newSelectedTestPoint = pointLine.Points[iNearestIndex].Tag as TestPoint;

			SetToolTip(chart, newSelectedTestPoint);
			
			break;
		}
	}
}
PointLineChart.PNG
PointLineChart.PNG (15.94 KiB) Viewed 7880 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Point Line Chart Tooltip

Post by ArctionPasi » Tue Jul 01, 2014 2:44 pm

How about setting a SeriesEventMarkers to positions of the points? In marker's MouseOverOn event, you'll get info of which marker was selected.
LightningChart Support Team, PT

Post Reply