New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Data Binding RadChart to an Array

RadChart has been replaced by RadHtmlChart, Telerik's client-side charting component. If you are considering RadChart for new development, examine the RadHtmlChart documentation and online demos first to see if it will fit your development needs. If you are already using RadChart in your projects, you can migrate to RadHtmlChart by following these articles: Migrating Series, Migrating Axes, Migrating Date Axes, Migrating Databinding, Features parity. Support for RadChart is discontinued as of Q3 2014, but the control will remain in the assembly so it can still be used. We encourage you to use RadHtmlChart for new development.

To bind a RadChart to an Array object, assign the RadChart DataSource property to the array, then call the RadChart DataBind() method. The example below demonstrates data binding to an array of integers.

Databinding to an array

protected void Page_Load(object sender, EventArgs e)
   int[] intArray = new int[4] { 10, 12, 13, 5 };
   RadChart1.DataSource = intArray;
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    Dim intArray As Integer() = New Integer(4) {10, 12, 13, 5}
    RadChart1.DataSource = intArray
End Sub

See Also

In this article