chart fx 图片汇出

MemoryStream ms = new MemoryStream(); Chart1.Export(ChartFX.WebForms.FileFormat.Jpeg, ms); //chart fx 提供汇出的功能,可以再配合使用ExportImageSize来决定图片大小 byte[] bytImage = ms.ToArray(); //以下代码同档案下载 Response.Clear(); Response.ClearHeaders(); Response.Buffer = false; Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment;filename=abcde.jpg"); Response.AppendHeader("Content-Length", bytImage.Length.ToString()); Response.BinaryWrite(bytImage); Response.Flush(); Response.End();

你可能感兴趣的:(chart)