This is a migrated thread and some comments may be shown as answers.

LoadFromXml width & height not working

1 Answer 64 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrew
Top achievements
Rank 2
Andrew asked on 27 May 2009, 02:51 PM

 

 

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?

Andrew

1 Answer, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 29 May 2009, 09:11 AM
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() 
        { 
            InitializeComponent(); 
 
            RadChart chart = new RadChart(); 
            chart.LoadFromXml("chart.xml"); 
            this.Controls.Add(chart); 
        } 
    } 

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

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,
Evtim
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.
Tags
Chart (obsolete as of Q1 2013)
Asked by
Andrew
Top achievements
Rank 2
Answers by
Dwight
Telerik team
Share this question
or