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

[Solved] Binding to Chart Series

2 Answers 138 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sergio Loscialo
Top achievements
Rank 1
Sergio Loscialo asked on 12 Jul 2012, 09:12 PM
I'm having some trouble figuring out how to create a simple bar chart with 1-to-n number of bars.



That is, my users may select any number (less than 6, let's say) of data indicators and would like to see them graphed. So far, it seems like I have to manually create a BarSeries for each indicator I want to graph.  However, it's dynamic and may not always show the same data from one use to the next.



For example, a user may want to see a graph for items A, B and C.  Then return to the selection screen and want to see a graph for items E and F.



Is there any way to accomplish this?



Thanks,

2 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 16 Jul 2012, 09:12 AM
Hi Sergio,

Thank you very much for your interest in RadControls for Metro.

If I understand you correctly your scenario is to pass some data to RadChart directly and the needed series to be created automatically depending on some criteria. This is currently not supported as the data-binding mechanism is implemented on a per Chart Series basis - each ChartSeries has a property ItemsSource.

We however do have plans to implement data binding on a per Chart instance basis that will allow you, depending on some SeriesDefinition descriptor to pass a data to the Chart and it will created the needed series. We will do our best to add this feature for the first official release of our controls - date is still TBD.

In the mean time you can try to implement you scenario in code behind, as a proof of concept. I will gladly help you with the implementation and any questions/problems you may have.

Greetings,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sergio Loscialo
Top achievements
Rank 1
answered on 16 Jul 2012, 02:03 PM
Georgi,



That's right. I want to use data binding to create my series to better adhere to an MVVM approach.  In the meantime, I did create the desired functionality in the code-behind of the view.

Looking forward to the final release (btw, a DataGrid would be nice too).



Thanks,

  Sergio
Tags
Chart for XAML
Asked by
Sergio Loscialo
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Sergio Loscialo
Top achievements
Rank 1
Share this question
or