Edit this page

Data Binding RadChart to an Array

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.

chart-building-radcharts-data-binding-radchart-to-an-array 001

int[] intArray = new int[4] { 10, 12, 13, 5 };
radChart1.DataSource = intArray;

RadChart1.DataSource = New Double() {1.4, 1.9, 3.6, 3.6, 4.1}
RadChart1.ChartTitle.TextBlock.Text = "Units Purchased (Thousands)"