I saved chart as .jpeg. Could you check my code. I appreciate any help or resources.
RadChart chart = (RadChart)item["CHART_COLUMN"].FindControl("RadChart1");
SetChart(chart, item);
MemoryStream imageStream = new MemoryStream();
chart.Save(imageStream, ImageFormat.Jpeg);
Byte[] imageContent = new Byte[imageStream.Length];
imageStream.Position = 0;
Response.ContentType = "image/gif";
imageStream.Read(imageContent, 0, (Int32)imageStream.Length);
imageStream.Close();
RadBinaryImage rbi = (RadBinaryImage)item["chartimage"].FindControl("RadBinaryImage1");
if (rbi != null)
{
rbi.DataValue = (Byte[])imageContent;
// rbi.DataBind();
}