Page 1 of 1

Posted: Tue Nov 25, 2003 9:35 pm
by Pep
You should do a repaint before the Chart is saved. You can use the Invalidate method :

tChart.Invalidate();
tChart.Chart.Export.Image.PNG.Save("C:\\test.png");

Josep Lluis Jorge
http://support.steema.com

Posted: Wed Nov 26, 2003 12:29 pm
by Pep
Using the following code works fine (use Series.Add to add the Series to the Chart) :

Code: Select all

			Steema.TeeChart.Chart tChart = new Steema.TeeChart.Chart(); 
			tChart.Width = 600; 
			tChart.Height= 400; 
			tChart.Header.Visible = false; 
			tChart.Panel.Gradient.Visible = true; 
			tChart.Series.Clear(); 
			tChart.Legend.ResizeChart = true; 
			tChart.Legend.Symbol.Squared = true;  

			Steema.TeeChart.Styles.Pie tPie = new Steema.TeeChart.Styles.Pie(); 
			tChart.Series.Add(tPie);
//			Steema.TeeChart.Styles.Series tSeries = tChart.Series[0]; 
			tPie.PercentFormat = "###0%"; 
			tPie.CustomXRadius = 0; 
			tPie.CustomYRadius = 0; 

			tPie.Marks.Transparent = true; 
			tPie.ShowInLegend = true; 
			tChart.Legend.TextStyle = Steema.TeeChart.LegendTextStyles.Plain; 
			tPie.Marks.Style = Steema.TeeChart.Styles.MarksStyles.LabelPercent; 

			tPie.FillSampleValues(10); 
			tChart.Invalidate();  
			tChart.Chart.Export.Image.PNG.Save("C:\\test.png"); 

Josep Lluis Jorge
http://support.steema.com