LoadFromXml width & height not working

Thread is closed for posting
2 posts, 0 answers
  1. Andrew
    Andrew avatar
    30 posts
    Member since:
    Nov 2008

    Posted 27 May 2009 Link to this post



    I'm attempting to load default chart settings from an xml file like this:-

    RadChart chart = new RadChart();
    chart.LoadFromXml (filename)
    But the default size of chart (400px x 300px) seems to get used despite the fact that my xml starts like this :-

    <RadChart Location="0, 0" Size="300, 200" TabIndex="0">

    Why is this? Is it a bug? Are there any other items that cannot be set from the xml file?


  2. Dwight
    Dwight avatar
    475 posts

    Posted 29 May 2009 Link to this post

    Hi Andrew,

    I cannot reproduce the issue. Here is my code (I am sending only the code-behind, as the application contains no other controls):
    namespace WindowsFormsApplication1 
        public partial class Form1 : Form 
            public Form1() 
                RadChart chart = new RadChart(); 

    And here is the XML file:
    <RadChart DefaultType="Pie" Location="0, 0" Size="120, 100" TabIndex="0"
        <ChartSeries Type="Pie" Name="Series 1"
            <ChartSeriesItem YValue="10" Name="Item 1" /> 
            <ChartSeriesItem YValue="20" Name="Item 2" /> 
            <ChartSeriesItem YValue="17" Name="Item 3" /> 
            <ChartSeriesItem YValue="30" Name="Item 4" /> 
        <XAxis MinValue="1" MaxValue="4" /> 

    Can you, please, provide a sample project that we can analyze? In order to do that, you need to open a Support ticket (not forum) or I can move the current thread in the Support area if that will be easier for you.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top