child chart Location cannot be set for TeeChart.WPF

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

child chart Location cannot be set for TeeChart.WPF

Post by Candy » Wed Jun 25, 2014 9:21 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

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

Post by Narcís » Wed Jun 25, 2014 11:49 am

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);
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

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

Post by Candy » Thu Jun 26, 2014 2:19 am

thanks

Post Reply