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

Using MVVM with RadChart control

4 Answers 107 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris Thierry
Top achievements
Rank 1
Chris Thierry asked on 11 May 2011, 03:44 PM

Hi, 
    I want to migrate a Silverlight 4 application using VS2010, in fact I'm going to start with a page that contains different radchart that interact together, for example if I click in a chart item, I need to refresh the other chart with related information.

My question is, Telerik Silverlight Controls are fully compatible with MVVM? I saw some thread without answer about some event using CallMethodAction. I don't want to start migrating my application if I'm going to have issues with copatibility... Is there any example using events other than click button?, also I found comments in this forum about trying to do an event in the ViewModel without success, but is working fine in the View.

So, if the concept of MVVM is trying to put everything in the ViewModel, I shoudn't have problems moving these events into my ViewModel, Please I need an answer and some examples before start doing the migration.

Thank you very much.

4 Answers, 1 is accepted

Sort by
0
Chris Thierry
Top achievements
Rank 1
answered on 13 May 2011, 02:47 PM

Hi,
Is there any way to use any event in a RadChart using triggers?
Is there any example that I can see?
I checked the demos but is only a normal chart without any interaction.
Thanks.
0
Evgenia
Telerik team
answered on 17 May 2011, 07:42 AM
Hello Chris,

To be able to have radcharts that interact together (clicking a chart item refreshes the other chart's data) you can review our DrillDown demo with full source code as well as our online documentation.
All our demos are made by using the MVVM pattern. Let us know if you need further assistance with this scenario.

All the best,
Evgenia
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
0
mgturner
Top achievements
Rank 1
answered on 31 Oct 2011, 04:16 PM

Do you have any example using drill down on RadChart with WPF and Prism. I'm particular interested when I click on the Chart area to drill down that I'm able to capture and publish an event. I know I can use ItemClick in my view.xaml.cs but then I would need to get a reference to EventAggregator and RegionManager,in view.xaml.cs, in order to publish an event. I prefer to capture the click event in my viewModel.cs where I have a reference to EventAggregator and RegionManager but how do I wire up the click event in xaml to go to my viewModel.cs. I'm using version RadControl Q2 2010.

<telerik:ChartDefaultView.ChartArea>                       
                        <telerik:ChartArea ItemClick="ChartAreaItemClick"   PaletteBrushesRepeat="False" >
                        </telerik:ChartArea>                    
</telerik:ChartDefaultView.ChartArea>
 
 
//Code behind
       protected void ChartAreaItemClick(object sender, ChartItemClickEventArgs e)
        {
            double StatusCount = e.DataPoint.YValue;
            string StatusName = e.DataPoint.XCategory;
       }
0
mgturner
Top achievements
Rank 1
answered on 01 Nov 2011, 05:35 AM
Tags
General Discussions
Asked by
Chris Thierry
Top achievements
Rank 1
Answers by
Chris Thierry
Top achievements
Rank 1
Evgenia
Telerik team
mgturner
Top achievements
Rank 1
Share this question
or