Define series from XML

2 posts, 0 answers
  1. Martijn
    Martijn avatar
    16 posts
    Member since:
    Apr 2007

    Posted 16 Aug 2007 Link to this post

    I have generated the following XML:

    <?xml version="1.0" encoding="utf-8" ?>   
    <HapTestWaarden xmlns:xsi="" xmlns:xsd="">  
      <Waarde motorA="74" motorB="57" motorC="0" />   
      <Waarde motorA="75" motorB="48" motorC="0" />   
      <Waarde motorA="11" motorB="38" motorC="0" />   
      <Waarde motorA="14" motorB="26" motorC="0" />   
      <Waarde motorA="71" motorB="14" motorC="0" />   
      <Waarde motorA="-5" motorB="39" motorC="0" />   
      <Waarde motorA="-2" motorB="74" motorC="0" />   
      <Waarde motorA="46" motorB="11" motorC="0" />   
      <Waarde motorA="74" motorB="12" motorC="0" />   
      <Waarde motorA="95" motorB="11" motorC="0" />   

    Now i want to place this data into a radChart. In the radChart there needs to be three series defined: motorA, motorB, motorC. These values must be placed on the Y-axis.

    I`m new to using Series and cant get this working.
  2. Kiril
    Kiril avatar
    158 posts

    Posted 17 Aug 2007 Link to this post

    Hi Martijn,

    Thanks for reaching us with this question.

    There is an example in the Quick Start Framework which covers your scenario partially. In the databinding section of the RadChart examples, you can find an example named XML, which binds the data in an XML file to a piechart. 

    In your specific scenario, you first need to initialize the type of chart you need (line, area, bar, etc) using the wizard in design view. Then you need to bind the RadChart to the XML file. You can do that with the code block below:

    //load the xml file to be displayed  
    radChart1.DataSource = "..\\Chart\\DataBinding\\XMLBinding\\data.xml";   

    Let me know if you have any additional questions. Your feedback is very important to us.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
Back to Top