Manually add data into OrgSeries (Organizational Charts)

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Cliven
Newbie
Newbie
Posts: 18
Joined: Fri May 14, 2004 4:00 am
Contact:

Manually add data into OrgSeries (Organizational Charts)

Post by Cliven » Tue Mar 25, 2008 8:11 am

Anyone have example to add data into OrgSeries manually without using the editor?

Thanks.

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

Post by Narcís » Tue Mar 25, 2008 11:21 am

Hi Cliven,

Yes, you can do something like this:

Code: Select all

			Steema.TeeChart.Styles.OrgSeries org1 = new Steema.TeeChart.Styles.OrgSeries(tChart1.Chart);

			int i = org1.Add("Parent", -1);
			org1.Add("Child 1", i);
			org1.Add("Child 2", i);
			org1.Add("Child 3", i);
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

Cliven
Newbie
Newbie
Posts: 18
Joined: Fri May 14, 2004 4:00 am
Contact:

Post by Cliven » Wed Mar 26, 2008 1:46 am

Hi Narcis,

Thanks for the example.

I noticed if the child's string is too long, it tend to overlap with the other child. Example as below:

Image

Is there anyway to prevent this? Any setting I can put?

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

Post by Narcís » Wed Mar 26, 2008 9:32 am

Hi Cliven,

Yes, this is a known issue (TF02012925) on our defect list to be fixed for next releases.

The only solutions I can think of is making parent nodes wider (setting them with a longer string) to leave more room por children nodes or adding line breaks to make nodes narrower, for example:

Code: Select all

			Steema.TeeChart.Styles.OrgSeries org1 = new Steema.TeeChart.Styles.OrgSeries(tChart1.Chart);

			int i = org1.Add("Parent", -1);
			org1.Add("Child 1", i);
			int i2 = org1.Add("Child 2", i);
			int i3 =org1.Add("Child 3", i);
			org1.Add("Grand\nChild 1", i2);
			org1.Add("Grand\nChild 2", i2);
			org1.Add("Grand\nChild 3", i3);
			org1.Add("Grand\nChild 4", i3);
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

Post Reply