Edit this page

Data Binding RadChart to a Generic List of Simple Types

The example below is the result of binding a generic List<> of double to the RadChart DataSource property and calling the DataBind() method.

chart-building-radcharts-data-binding-radchart-to-a-generic-list-of-simple-types 001

List<double> chartData = new List<double>();
chartData.Add(34);
chartData.Add(45);
chartData.Add(56);
chartData.Add(67);
chartData.Add(78);
radChart1.DataSource = chartData;

Dim chartData As New List(Of Double)()
chartData.Add(34)
chartData.Add(45)
chartData.Add(56)
chartData.Add(67)
chartData.Add(78)
RadChart1.DataSource = chartData