/////////////////////////////////////////////////////////
<!--开始-->
<%@ Page Language="C#" ContentType="image/jpeg" %>
<%@ Import namespace="System.Drawing"%>
<html>
<head>
<script language="C#" runat="server">
void Page_Load(object sender,EventArgs e)
{
Bitmap image=new Bitmap(350,200);
Graphics g=Graphics.FromImage(image);
g.Clear(Color.White);
Rectangle outline=new Rectangle(10,5,300,100);
g.DrawEllipse(new Pen(Color.Black,8.0f),outline);
g.FillPie(new SolidBrush(Color.Red),outline,-20f,120f);
//这些角度的大小可以由数据库中的对比数据计算决定
g.FillPie(new SolidBrush(Color.Yellow),outline,100f,120f);
g.FillPie(new SolidBrush(Color.Blue),outline,220f,100f);
g.FillPie(new SolidBrush(Color.Green),outline,320f,40f);
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
}
</script>
</head>
<body>
<form runat="server">
</form>
</body>
</html>
<!--结束-->