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

ChartArea_ItemClick

2 Answers 71 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Li
Top achievements
Rank 1
Li asked on 25 Oct 2010, 05:19 PM
Hi,
I'm using MVVM base on the example of DrillDownCHart. My itemToolTipOpening chart is working fine. But the ChartArea_ItemClick doesn't work. ToolTipOpening and ItemClick share the same viewModel and chart Xaml. 

Updates: I found that this actually working, but it's  just hard to capture the chart, it's blinking. And sometimes it went to tipopenning first and that took awhile comeback to itemClick. So my question are
 1) how to separate these two events, meaning click should not go to ToolTipOpenning
2) how to make the itemClick chart staple. Anything could through xaml?

private

 

 

void ChartArea_ItemClick(object sender, ChartItemClickEventArgs e)

{

DataPoint selectedItem = e.DataPoint ;

 

DrillDownChartViewModel dViewModel = new DrillDownChartViewModel();  

 

dViewModel =

 

 

 

this.ViewModel.ActiveDetails.DrillDownChartSeries.FirstOrDefault(d => d.DataItem == e.DataPoint);

 

dViewModel.LoadToolTipSourceTable(selectedItem);

 

 

 

DrillDownChartToolTip toolTipControl = new DrillDownChartToolTip();

 

toolTipControl.DataContext = dViewModel;

toolTipControl.Height = 200;

toolTipControl.Width = 420;

 

}

2 Answers, 1 is accepted

Sort by
0
Li
Top achievements
Rank 1
answered on 26 Oct 2010, 02:08 PM
Can some one give me a hint regarding my question?
0
Evgeni "Zammy" Petrov
Telerik team
answered on 28 Oct 2010, 03:49 PM
Hello Li,

Thank you for contacting us.

1. Here is a LifeCycle of the events I am getting on my tests:

Move mouse cursor on a chart item.
Event: Tool Tip Opening Click on a chart item.
Event: Tool Tip Closing
Event: Item Clicked
Move mouse cursor off a chart item. Event: Tool Tip Closing

Clicking an item does not invoke Tool Tip Opening.
I checked it with 2010 Q2 SP2 assemblies. Can you send me a runnable example, so I can see why this is happening ?

ol Tip Closing
Item Clicked
Tool Tip Closingevasfas
2. You can try using RadWindow control. In this way it will stay after item tool tip is closed.

Regards,
Evgeni "Zammy" Petrov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Li
Top achievements
Rank 1
Answers by
Li
Top achievements
Rank 1
Evgeni "Zammy" Petrov
Telerik team
Share this question
or