StreetSmart 铁炉堡

狮子从不在乎猴子是否在嘲笑它

将WebChart以非图片的方式发布
            ChartEngine wcEng = new ChartEngine();
            wcEng.Size = new Size(200, 200);
            ChartCollection wcCharts = new ChartCollection(wcEng);
            wcEng.Charts = wcCharts;
            SmoothLineChart slChart = new SmoothLineChart();
            slChart.Line.Color = Color.Red;
            slChart.Legend = "Watts";
            slChart.ShowLineMarkers = false;
            slChart.ShowLegend = false;
            slChart.Data.Add(new ChartPoint("One", 12));
            slChart.Data.Add(new ChartPoint("Two", 22));
            slChart.Data.Add(new ChartPoint("Three", 2));
            wcCharts.Add(slChart);
 
            //' Uncomment this line to Set-up Optional properties on the chart
            //' SetMoreProperties(wcEng)
            Bitmap bmp;
            System.IO.MemoryStream memStream = new System.IO.MemoryStream();           
            bmp = wcEng.GetBitmap();
            bmp.Save(memStream, System.Drawing.Imaging.ImageFormat.Png);
            memStream.WriteTo(Response.OutputStream);
            Response.End(); 
阅读更多
文章标签: properties
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

将WebChart以非图片的方式发布

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭