Page 1 of 1

child chart Location cannot be set for TeeChart.WPF

Posted: Wed Jun 25, 2014 9:21 am
by 15656007
I want to create more child chart, please look at the code:

Steema.TeeChart.WPF.TChart child = new Steema.TeeChart.WPF.TChart();
child.Chart.ChartRect.Location = new Point(100, 50); // invalid
child.Chart.ChartRect.X = 100; // invalid
child.Chart.ChartRect.Y = 50; // invalid
child.Width = 500; // valid
child.Height = 250; // valid
tChart1.Children.Add(child);

Child charts will overlap, why child chart' ChartRect.Location cannot be set? It's always Point(0,0).

this is a BUG? :?

I'm working environment is: VS2010(.NET Framework 4.0) / Windows7

Re: child chart Location cannot be set for TeeChart.WPF

Posted: Wed Jun 25, 2014 11:49 am
by narcis
Hi Candy,

You are not using the right properties, I'm afraid. Try using Margin instead:

Code: Select all

      Steema.TeeChart.WPF.TChart child = new Steema.TeeChart.WPF.TChart();

      child.Margin = new Thickness(100, 50, 0, 0);
      child.Width = 500; // valid
      child.Height = 250; // valid
      tChart1.Children.Add(child);

Re: child chart Location cannot be set for TeeChart.WPF

Posted: Thu Jun 26, 2014 2:19 am
by 15656007
thanks