问题
I am using Modern UI Charts for Windows 8 and I need to do a drill down when the user selects a series item in the chart
(for eg: I have a Column Chart which shows a student Year wise performance and when user selects a particular Column I should show another Column chart with the score he obtained for that particular year in each subject)
I am looking for some kind of selectionchanged event or something similar so that I can change the input to the series to get a different chart
Please Help!!
回答1:
Currently I have intentionally not implemented any events in the charts. You can use a two-way data binding to react on changes.
You can bind a property of your view model to the SelectedItem property of the chart and you get notified if the selection changes.
See the sample in the documentation http://modernuicharts.codeplex.com/documentation#howto1
With this approach you could directly bind a second chart to the SelectedItem property and all "magic" is done by data binding.
Cheers, Torsten
来源:https://stackoverflow.com/questions/16669006/onselectionchanged-event-for-chart-controls-in-modern-ui-charts-for-windows-8