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

Data Binding RadChart to an XML file

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 RadChart to XML data you can:

  1. Bind directly to the XML file itself programmatically at run-time.

  2. Bind to XML data by using an XMLDataSource at design-time.

Products.XML is used for both examples.The XML file is located in the same directory as the default page used to display it.

<?xml version="1.0" encoding="utf-8" ?>
<Product Name="Parka L" QuantityInStock="123"></Product>
<Product Name="Parka M" QuantityInStock="56"></Product>
<Product Name="Parka S" QuantityInStock="92"></Product>
<Product Name="Mittens" QuantityInStock="12"></Product>

See Also

In this article