M
Mathias
I have the following code that generates a bitmap on which I'm drawing
a graph. The graph has one point for each minute in a day so the
bitmap is 1440 pixels in height. Therefore I'd like to place the
bitmap in a scrollable control. I tried with a panel
Panel panel = new Panel();
panel.Controls.Add(bitmap);
but it doesn't work. So, can anyone tell me how to do it or point me
in the right direction? Thanks
public partial class _Graph : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DrawGraph();
}
void DrawGraph()
{
Bitmap bitmap = new Bitmap(500, 1440);
Graphics graphics;
graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
// Draw graph here
Response.ContentType = "image/jpeg";
bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);
bitmap.Dispose();
}
}
a graph. The graph has one point for each minute in a day so the
bitmap is 1440 pixels in height. Therefore I'd like to place the
bitmap in a scrollable control. I tried with a panel
Panel panel = new Panel();
panel.Controls.Add(bitmap);
but it doesn't work. So, can anyone tell me how to do it or point me
in the right direction? Thanks
public partial class _Graph : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DrawGraph();
}
void DrawGraph()
{
Bitmap bitmap = new Bitmap(500, 1440);
Graphics graphics;
graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
// Draw graph here
Response.ContentType = "image/jpeg";
bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);
bitmap.Dispose();
}
}