Page 1 of 1

Capturing the generated image file name progamatically

Posted: Fri Feb 20, 2004 3:14 pm
by 8123840
If you create a webchart programatically, is there a way to also access the name of the image file name that it generates in code?

Posted: Mon Feb 23, 2004 12:45 pm
by Chris
Hi --
If you create a webchart programatically, is there a way to also access the name of the image file name that it generates in code?
Sure; you can use code similar to the following:

Code: Select all

Steema.TeeChart.Chart Chart1 = new Steema.TeeChart.Chart();
Chart1.Series.Add(new Steema.TeeChart.Styles.Bar());
Chart1.Series[0].FillSampleValues(20);
Chart1.Height =Convert.ToInt32(Image1.Height.Value);
Chart1.Width = Convert.ToInt32(Image1.Width.Value);
Chart1.Export.Image.GIF.Save(@"C:\inetpub\wwwroot\test.gif");
Image1.ImageUrl = "http://localhost/test.gif";

Posted: Mon Feb 23, 2004 3:19 pm
by 8123840
Perfect. Thank you.