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

Bind DataTable to Chart in Code Behind

1 Answer 104 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 21 Feb 2014, 06:43 AM
I am lookinf forward to bind DataTable to Telerik chart in code behind, Kindly look at datatable which is attached. In that i have three column(DataTemp,PlantNo,Stator) Out of this DataTemp is my Y axis, PlantNo is my Series, Stator is X Axis. Kindly Help.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 25 Feb 2014, 11:59 AM
Hi Manoj,

Note that the RadChart has many known limitations and this is why we created new charting components (RadChartView) with better implementation and improved performance. You can read about the differences between the charts in the RadChart vs. RadChartView help article.

As for your question you can take a look at the Binding to a DataTable help article which demonstrates how to populate RadCartesianChart with a DataTable consisted of 3 Columns. I also attached a project with a sample implementation. You could use it as a base for your scenario. 

Also keep in mind that you cannot directly populate an axis with data. The values on the ticks of an axis depends on the data passed to its Series via their ItemsSource property.

Regards,
Martin
Telerik
Tags
Chart
Asked by
Manoj
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or