I have created a line graph in C# but it doesnt appear. Ideally I would like it to displayed on a new Windows Form or in IE. This is the code I used to plot it on stage:
Code:
protected void PlotGraph()
{
// Plot the whole graph in form at coordinates (0,0)
Form statsForm = new Form();
objGraphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
statsForm.Controls.Add(objGraphics.DrawImageUnscaled(objBitmap, new Point(0,0))); // Doesnt work!
// ALSO TRIED:
// objGraphics.DrawImageUnscaled(objBitmap, new Point(0, 0)); // DOESNT APPEAR
// AND:
//objBitmap.Save(Response.OutputStream, ImageFormat.Png); // DOESNT APPEAR
// AND:
// Render BitMap Stream Back To Client
//Bitmap StockBitMap;
//Response.ContentType = "image/png";
//MemoryStream memStream = new MemoryStream();
//StockBitMap.Save(memStream, ImageFormat.Png);
//memStream.WriteTo(Response.OutputStream);
}