This is a migrated thread and some comments may be shown as answers.
Mouse Hover Over Chart DataPoint Event
1 Answer 58 Views
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 19 Jun 2018, 06:25 PM

Hello,

I would've thought there would be a simple way to do this, but having gone through the documentation I can't find anything.

 

What I want is that when there resides a data point on a chart which can be used to drill down to another chart, that when the mouse cursor hovers over that data point the cursor will change from an arrow to a hand.

https://docs.telerik.com/devtools/winforms/chartview/features/drill-down

 

Within the RadChartView object I can't find any events that would inform me of when the mouse cursor resides over a datapoint, and even when using the coordinates on the "MouseMove" event, I can't find anything within the API to translate the coordinates to a data point. 

Is there anyway to know when the mouse cursor is hovering over a datapoint?

Thanks!

Matt

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 20 Jun 2018, 08:47 AM
Hi Matt, 

There is a way to do this. You can use the following method:
private void RadChartView1_MouseMove(object sender, MouseEventArgs e)
{
    var point = this.radChartView1.Area.View.Renderer.HitTest(e.X, e.Y);
 
    if (point != null)
    {
 
        this.radChartView1.Cursor = Cursors.Hand;
    }
    else
    {
        this.radChartView1.Cursor = Cursors.Default;
    }
}

We will consider adding this somewhere in our documentation as well. 

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Matt
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or