This is a migrated thread and some comments may be shown as answers.

Pie Chart - Mouse Tracking

6 Answers 51 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Brent
Top achievements
Rank 1
Brent asked on 27 Dec 2012, 07:05 PM
Hi guys... we are using 2012 Q2 PieChart control. We have it where the pie slices explode on mouse over - looks great. The problem is, if you move the mouse around the inside of the pie, the slices sometimes explode, flicker or do nothing. If we move the mouse off, then back on each slice, it works perfectly. Is this a known issue or something we need to set in code.

Thx

Brent

6 Answers, 1 is accepted

Sort by
0
Missing User
answered on 01 Jan 2013, 02:18 PM
Hello Brent,

We have trouble reproducing the problem. We'll need to know more about how exactly you make pie slices explode. Ideally, you could send a sample project that we can build and run and see the behavior you've described. Once we've got enough information to work with, we'll do our best at identifying and removing the issue.

All the best,
Ivan N.
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Brent
Top achievements
Rank 1
answered on 06 Jan 2013, 03:17 AM
Thanks Ivan... please take a look at this sample project: http://www.localligence.com/SampleRadChart.zip. After running the project, move your mouse around the inside of the pie, and while initially the slices explode correctly, they soon start to stutter as you move. Any help you can provide woulde be appreciated.

Regards

Brent
0
Missing User
answered on 08 Jan 2013, 04:53 PM
Hi Brent,

Thank you for providing us with a sample project. We were able to identify the problem immediately. The pie slices flicker only when the mouse is positioned over a label, i.e. each pie slice detects the mouse cursor has left it. You can try one of the following workarounds:

1. Change the labels' left margin to -1. This will position them outside the pie slice. In addition, you should set the ClipToBounds property of the pie chart to False, since otherwise labels may appear cut off when you hover over a slice.

2. Add the following style to the label definition:
<telerik:ChartSeriesLabelDefinition.DefaultVisualStyle>
    <Style TargetType="TextBlock">
        <Setter Property="IsHitTestVisible" Value="False"/>
    </Style>
</telerik:ChartSeriesLabelDefinition.DefaultVisualStyle>

Either one of the above should prevent any unwanted flickering when moving the mouse inside the pie slice area.

Greetings,
Ivan N.
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Brent
Top achievements
Rank 1
answered on 09 Jan 2013, 06:25 PM
Hi Ivan... thanks for the detail. We tried what you mentioned above, but I think the problem is something else. It looks like the issue is when the mouse moves over the 'gap' between the exploded pie slice. When in this space, the flickering is occurring. I've included an AVI of the problem here: http://www.localligence.com/pie_mouse-tracking.avi.
 
Please take a look and give me your thoughts.

Thx

Brent
0
Accepted
Missing User
answered on 10 Jan 2013, 04:07 PM
Hi Brent,

In this case the behavior you experience is completely expected, because you deselect a pie slice when the mouse cursor leaves the series. The gap you pointed out is not a part of the series when the slice is selected. That's why once the cursor is moved even a single pixel while in this gap, the slice will be deselected and, since the cursor is now directly positioned over the pie series again, the slice will be selected, causing a loop as long as the cursor is positioned within the gap area.

As a workaround, you can try deselecting a slice when the cursor leaves the chart. Remove the line
MouseLeave="PieSeries1_MouseLeave"
from the PieSeries tag and put it in the RadPieChart tag. Note that, in your case, you'll also have to set the PieChart's width accordingly, otherwise it will stretch to fit the boundaries of its parent element. Thus, the cursor will always be considered inside the chart and pie slices will remain exploded until the cursor is moved away from the chart's vertical boundaries.

Greetings,
Ivan N.
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Brent
Top achievements
Rank 1
answered on 11 Jan 2013, 06:37 PM
Thx Ivan.. that did the trick.

Regards

Brent
Tags
Chart
Asked by
Brent
Top achievements
Rank 1
Answers by
Missing User
Brent
Top achievements
Rank 1
Share this question
or