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

on mouse hover drill down

2 Answers 63 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Abdulhameed
Top achievements
Rank 1
Abdulhameed asked on 01 Feb 2012, 06:37 AM

I have two charts CountrySalesChart and RegionSalesChart, I would like when mouse hover the countrySalesChart, it updates the RegionSales.

What I tried two approaches
-The firs one I have added a HoverChanged event on the chartArea, however the chartArea includes the whole are not only the chartItems and it raised exceptions and it usually when you move the mouse a bit fast it raise the exception and stops.

-The second approach is by adding a MouseBehavior to each DataItem in CountrySalesChart which is great but I couldn't access the RegionSalesChart to update in the chartItem_MouseEnter events, when I tried to access the chart I get the below error
"An object reference is required for the non-static field"

Any suggestion for a better method to achieve the desired result or an improvement to either of the above method will be highly appreciated.

2 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 06 Feb 2012, 10:19 AM
Hi,

I have attached a sample Silverlight 5 project that demonstrates how this functionality can be achieved. I have used a pie series but you can easily adopt it to any series you have used.

Hope this is of help. Regards,
Petar Marchev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Abdulhameed
Top achievements
Rank 1
answered on 06 Feb 2012, 01:50 PM
Thanks a lot for your replay,

I tried a similar approach however because of WCF async methods, the data was missed up.
So, I decided to update data on click instead of on hover.
Tags
Chart
Asked by
Abdulhameed
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Abdulhameed
Top achievements
Rank 1
Share this question
or