Any way to get a chart showing in an HTML document?

I am using the Webbrowser control to render an HTML document. I want to have a chart to be shown in the document. Anyone have any suggestions? TIA

2 Replies

DJ Daniel Jebaraj Syncfusion Team September 7, 2004 05:57 PM UTC

Hi, You can save the chart to a temp file on disk (using Draw(Image img))and use the file:/// URL format to display the file. Sample code to save a chart to image is given below.
private void btnSaveToImage_Click(object sender, System.EventArgs e)
		{
			Image bitmap = new Bitmap(this.chartControl1.Width, this.chartControl1.Height);
			this.chartControl1.Draw(bitmap);
			bitmap.Save(@"c:\temp\chart_image.png", ImageFormat.Png);
			bitmap.Dispose();
		}
Best regards, Daniel >I am using the Webbrowser control to render an HTML document. I want to have a chart to be shown in the document. > >Anyone have any suggestions? > >TIA


AD Administrator Syncfusion Team September 7, 2004 07:14 PM UTC

Thanks Daniel, I''ll give it a try. >Hi, > >You can save the chart to a temp file on disk (using Draw(Image img))and use the file:/// URL format to display the file. > >Sample code to save a chart to image is given below. > >
>private void btnSaveToImage_Click(object sender, System.EventArgs e)
>		{
>			Image bitmap = new Bitmap(this.chartControl1.Width, this.chartControl1.Height);
>			this.chartControl1.Draw(bitmap);
>			bitmap.Save(@"c:\temp\chart_image.png", ImageFormat.Png);
>			bitmap.Dispose();
>		}
>
> > >Best regards, >Daniel > >>I am using the Webbrowser control to render an HTML document. I want to have a chart to be shown in the document. >> >>Anyone have any suggestions? >> >>TIA

Loader.
Up arrow icon