I have a linechart (i.e. a series segments linking my set of datapoints).
The ultrachart tooltip functionality only works when the mouse is near a datapoint. No tooltip is displayed when the mouse hovers on/near the segments between the datapoints, i.e. the points interpolated between the datapoints.
Is there a way to implement that myself?
I guess it would involve listening for mouse move events, take the mouse position, map it back to data coordinates, find the 2 neighboord data points in the data set, and see if the mouse lies close enough (by some threshold) to the interpolated segments between those 2 points. Is there a better way?
Thanks in advance.
that would be one way. you could also handle the FillSceneGraph, find the Polyline objects in your SceneGraph, and overlay Polygons. This will cause the polygons to show tooltips as well as raise DataItemOver and other chart events.
to make the polygons interactive, do this before adding them to the SceneGraph.
oly.Caps = PCaps.HitTest | PCaps.Tooltip
oly.Chart = myChart.ChartType
oly.Layer = e.ChartCore.GetChartLayer()
oly.Row = oly.Column = 0
Hi David,
Could you provide a sample of your solution? I can't figure out how you do this. I have a scatter chart where 2 points are connected with a line and I want to display a tooltip when my mouse is over the line as well as the mouse is over the datapoints
Thanks,