如何将.NET Web图表类改写为支持长尾关键词的?
- 内容介绍
- 文章标签
- 相关推荐
本文共计155个文字,预计阅读时间需要1分钟。
使用方法:设置响应内容类型为图像PNG,准备x轴和y轴数据,创建一个白色背景的折线图,不显示图例,显示数据点,高度和宽度均为250像素。
用法:
Response.ContentType = "image/png";
string[] xValues, yValues;
LineChart line = new LineChart(Color.White);
line.VerticalLabel = "告警数量";
line.ShowLegend = false;
line.ShowData = true;
line.Height = 250;
line.Width = 250;
GetValues(out xValues, out yValues); //填充数据
line.CollectDataPoints(xValues, yValues);
Bitmap StockBitMap = line.Draw();
MemoryStream memStream = new MemoryStream();
StockBitMap.Save(memStream, ImageFormat.Png);
memStream.WriteTo(Response.OutputStream);
本文共计155个文字,预计阅读时间需要1分钟。
使用方法:设置响应内容类型为图像PNG,准备x轴和y轴数据,创建一个白色背景的折线图,不显示图例,显示数据点,高度和宽度均为250像素。
用法:
Response.ContentType = "image/png";
string[] xValues, yValues;
LineChart line = new LineChart(Color.White);
line.VerticalLabel = "告警数量";
line.ShowLegend = false;
line.ShowData = true;
line.Height = 250;
line.Width = 250;
GetValues(out xValues, out yValues); //填充数据
line.CollectDataPoints(xValues, yValues);
Bitmap StockBitMap = line.Draw();
MemoryStream memStream = new MemoryStream();
StockBitMap.Save(memStream, ImageFormat.Png);
memStream.WriteTo(Response.OutputStream);

