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

Binding a series(s) to RadChart

1 Answer 22 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 02 Apr 2014, 02:33 PM
Hello,

I have successfully bound a list of items to a RadListBox ItemSource, and bound to one column as a RadPropertyGrid. The other column, we want to appear as RadChart, somehow binding to a data series. The underlying model is in the form of List Pair of TimeSpan and Double. Possibly we directly bind to this, or at least Path-ing our way into the domain model, i.e. TotalSeconds, TotalMilliseconds, etc.

Doable?

Possibly I could start with programmatically doing it, but I'd like to go the XAML route and data bind if I could. Have worked with more than one chart in this manner before.

Thank ye...

Best regards,

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 07 Apr 2014, 07:29 AM
Hello Michael,

As long as the Pair is a class and not a struct it should be possible to use only XAML. However, I am unsure how you need to chart the data. I am unsure about the TimeSpan part. You can use two linear axes and a scatter series (ScatterLineSeries or else). You can then set the XValueBinding of the series to the TotalHours of the time span and the YValueBinding to the double property. But the chart will display the total hours in the X-axis labels and I am not sure what this will mean to your users. However, you can give it a try. If you need further assistance I will ask that you provide us with a snapshot (drawing of some sort) that depicts the output you are after.

Regards,
Petar Marchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart
Asked by
Michael
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or