Page 1 of 1

Manually add data into OrgSeries (Organizational Charts)

Posted: Tue Mar 25, 2008 8:11 am
by 6933488
Anyone have example to add data into OrgSeries manually without using the editor?

Thanks.

Posted: Tue Mar 25, 2008 11:21 am
by narcis
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);

Posted: Wed Mar 26, 2008 1:46 am
by 6933488
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?

Posted: Wed Mar 26, 2008 9:32 am
by narcis
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);