网上找了一个实时曲线类public class RealTimeMaker
有一个返回函数
 public System.Drawing.Image GetCurrentCurve()
        {
            currentImage = new Bitmap(width, height);
            Point p;            for (int i = 0; i < width - 1; i++)
            {
                p = pointList[i + 1];
                pointList[i] = new Point(p.X - 1, p.Y);
            }            Point tempPoint = new Point();
            tempPoint.X = width;
            tempPoint.Y = random.Next(DateTime.Now.Millisecond) % height;            pointList[width - 1] = tempPoint;
            Graphics g = Graphics.FromImage(currentImage);
            
            g.Clear(backColor);
            g.DrawLines(new Pen(foreColor),pointList);
            g.Dispose();
            return currentImage;
        }怎么样能让绘制的图形显示到aspx页面

解决方案 »

  1.   

    有地三方的空间 charthttp://www.kmnet.net/Doc/10/1033/ 
      

  2.   

    返回的是一个image,你用一个image控件接受就ok了?
    有js画曲线的库,很不错
      

  3.   

    要实时曲线需要每隔固定时间替换绘制的image,用bitmap.Save()保存的图片,应该怎么清楚?
      

  4.   

    bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
            // Send the output to the client.
            Response.Flush();
      

  5.   

    这里IMG是Bitmap的实例,可以根据不同你画的类改.       //保存绘制的图片
             MemoryStream stream = new MemoryStream();
             img.Save(stream, ImageFormat.Jpeg);
             //图片输出
             page.Response.Clear();
             page.Response.ContentType = "image/jpeg";
             page.Response.BinaryWrite(stream.ToArray());