Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Advanced Tooltip
posted

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.

Parents
  • 28496
    Offline posted

    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

Reply Children