Building RadCharts Overview
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 provide flexibility and best ease-of-use, Telerik provides multiple avenues to populate RadChart. There are four main techniques for building the chart: interactively at design-time, declaratively in the ASP.NET HTML markup, programmatically at runtime and by data binding.
In simple scenarios or to test out a design you can use the design-time interface to build the entire chart. Collection editors provide a consistent interface and easy navigation over all your chart series and series items. You can also use the RadChart Wizard to display a subset of the data.
If your design style leans towards working with the ASP.NET HTML code directly you can declaratively define your chart series and chart series items.
Most business applications display some sort of database data so RadChart fully supports binding data sources to labels and data elements. RadChart also supports data binding to the X-Axis. In addition to database data, RadChart can bind to XML. RadChart binds to ObjectDataSource to support enterprise multi-tier scenarios. And of course you can bind your chart to arrays, collections, generic lists of simple types and lists of objects.
To create and populate the RadChart, ChartSeries and ChartSeriesItem collections:
-
At design time by using the editors for ChartSeries and ChartSeriesItem collections or using the RadChart Wizard.
-
Binding to a datasource at run time or design time.
-
Bind to a datasource programmatically to populate the ChartSeries and ChartSeriesItem collections. See this minimal example of creating and populating a RadChart programmatically or this more complex example.