日期:2014-05-18  浏览次数:20389 次

请问在asp.net中能否做复杂的图形显示界面?(比方电流随时间的凹凸矩形式的曲线图)----希望有人帮我解决一下啊!
如果asp.net不能达到这样的目的,那还需要加什么技术呢?
非常感谢给出回答的每位同胞.

------解决方案--------------------
当然可以的啊
JS没有什么效果实现不了的
重要的不是.NET
重要的是你的JS水平怎么样
------解决方案--------------------
Asp.net(C#)高手交流群(39364250),欢迎高手加盟!
------解决方案--------------------
//画图***********************************************************************************

int height = 400, width = 1000;
System.Drawing.Bitmap image = new System.Drawing.Bitmap(width, height);
//创建Graphics类对象
Graphics g = Graphics.FromImage(image);

try
{
//清空图片背景色
g.Clear(Color.White);

Font font = new System.Drawing.Font("Arial", 9, FontStyle.Regular);
Font font1 = new System.Drawing.Font("宋体", 20, FontStyle.Regular);

System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Blue, Color.Blue, 1.2f, true);
g.FillRectangle(Brushes.WhiteSmoke, 0, 0, width, height);
Brush brush1 = new SolidBrush(Color.Blue);

g.DrawString("" + selectyear + "年各月份销售金额统计", font1, brush1, new PointF(130, 30));
//画图片的边框线
g.DrawRectangle(new Pen(Color.Blue), 0, 0, image.Width - 1, image.Height - 1);

Pen mypen = new Pen(brush, 1);
//绘制线条
//绘制横向线条
int x = 100;
for (int i = 0; i < 11; i++)
{
g.DrawLine(mypen, x, 80, x, 340);
x = x + 40;
}
Pen mypen1 = new Pen(Color.Blue, 2);
g.DrawLine(mypen1, x - 480, 80, x - 480, 340);

//绘制纵向线条
int y = 106;
for (int i = 0; i < 9; i++)
{
g.DrawLine(mypen, 60, y, 540, y);
y = y + 26;
}
g.DrawLine(mypen1, 60, y, 540, y);

//x轴
String[] n = {" 一月", " 二月", " 三月", " 四月", " 五月", " 六月", " 七月",
" 八月", " 九月", " 十月", "十一月", "十二月"};
x = 62;
for (int i = 0; i < 12; i++)
{
g.DrawString(n[i].ToString(), font, Brushes.Red, x, 348); //设置文字内容及输出位置
x = x + 40;
}

//y轴
String[] m = {"100%", " 90%", " 80%", " 70%", " 60%", " 50%", " 40%", " 30%",
" 20%", " 10%", " 0%"};
y = 85;
for (int i = 0; i < 11; i++)
{
g.DrawString(m[i].ToString(), font, Brushes.Red, 25, y); //设置文字内容及输出位置
y = y + 26;
}
//显示柱状效果
x = 70;
for (int i = 0; i < 12; i++)
{
SolidBrush mybrush = new SolidBrush(Color.Red);
g.FillRectangle(mybrush, x, (float)(340 - (num[i] * 100 / sumrmb) * 26 / 10), 20, (float)((num[i] * 100 / sumrmb) * 26 / 10));
x = x + 40;
}
//销售详情
String[] mm = {" 一月", " 二月", " 三月", " 四月", " 五月", " 六月", " 七月",
" 八月", " 九月", " 十月", "十一月