Tomasz Wisniewski
Top achievements
Rank 1
Tomasz Wisniewski
asked on 12 Aug 2010, 11:14 AM
hello,
I'm using a PieChart in my SL application. I have the interactivity settings set to this:
And then I have the trigger which binds to my ViewModel:
But how can I bind the clicked item on the PieChart to be passed to my ViewModel? At least the label of it?
I'm using a PieChart in my SL application. I have the interactivity settings set to this:
<
telerik:PieSeriesDefinition.InteractivitySettings
>
<
telerik:InteractivitySettings
HoverScope
=
"Item"
SelectionMode
=
"Single"
SelectionScope
=
"Item"
/> </
telerik:PieSeriesDefinition.InteractivitySettings
>
And then I have the trigger which binds to my ViewModel:
<
telerik:ChartArea
LegendName
=
"rightChartLegend"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"ItemClick"
>
<
nRoute:ExecuteCommandAction
Command
=
"{Binding KliknieciePrawo, Source={StaticResource ViewModel}}"
Parameter
=
"{Binding ElementName=rightChart, Path=ClickedItem}"
/>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
telerik:ChartArea
>
But how can I bind the clicked item on the PieChart to be passed to my ViewModel? At least the label of it?
6 Answers, 1 is accepted
0
Hello Tomasz,
Unfortunately currently this is not possible as there are no SelectedItem/SelectedItems properties exposed that can be passed back to the ViewModel. However, we are planning to extend the Selection/Hover Interactivity API for the next official release of the control and we will make sure your scenario is enabled as well with the update.
Regards,
Freddie
the Telerik team
Unfortunately currently this is not possible as there are no SelectedItem/SelectedItems properties exposed that can be passed back to the ViewModel. However, we are planning to extend the Selection/Hover Interactivity API for the next official release of the control and we will make sure your scenario is enabled as well with the update.
Regards,
Freddie
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
Tomasz Wisniewski
Top achievements
Rank 1
answered on 17 Aug 2010, 10:40 PM
I've solved the issue by creating a converter and the values are passed to the ViewModel with no problems :)
0
Shrinand
Top achievements
Rank 1
answered on 18 Nov 2010, 10:27 PM
Is SelectedItem or SelectedItems collection available to bind to in the latest release of WPF controls?
What will be a workaround? Can you please post a solution Tomasz?
Thanks.
What will be a workaround? Can you please post a solution Tomasz?
Thanks.
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 19 Nov 2010, 04:49 PM
Hello Shrinand,
I think the ChartArea class exposes SelectedItems / SelectedSeries properties -- you can check them out.
Greetings,
Bart.
I think the ChartArea class exposes SelectedItems / SelectedSeries properties -- you can check them out.
Greetings,
Bart.
0
Shrinand
Top achievements
Rank 1
answered on 19 Nov 2010, 05:29 PM
Thanks for Replying Bartholomeo. But unfortunately there are no such properties. There are SelectItem, SelectItems, SelectSeries functions on ChartArea class.
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 19 Nov 2010, 06:21 PM
Hello,
I am using the latest version of the control (2010.3.1110.1040) and I definitely see them:).
Try downloading the latest binaries again.
Greetings,
Bart.
I am using the latest version of the control (2010.3.1110.1040) and I definitely see them:).
Try downloading the latest binaries again.
Greetings,
Bart.