很久以前写的东西了
SGC是Structured Graphic Control(结构化图形控件)的缩写,它是Microsoft Internet Explorer中的一组创建和处理矢量图形的ActiveX控件。使用SGC创建图表的步骤如下:
1)插入CLASSID属性为CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6的OBJECT标记,此操作代表对SGC的引用。同时设置OBJECT标记的style属性确定图表的显示样式;
2)通过插入一系列PARAM标记绘制图表,PARAM标记是OBJECT的子标记,它的基本语法是:,其中,“xxxx”必须是形如“0001”、“0002”的整数序列,“method(parameters)”指定了操作要以哪些参数执行哪个方法。在SGC中,可用的方法分为四类:绘制基于点阵的矢量形状,控制线条效果,控制填充效果和其它方法。结合使用这四种方法可以方便地实现图表主体、坐标、图例等的绘制。至于图表标题,可以直接使用HTML中的常用标记在SGC对象的外部体现。
diaocha.asp:
>
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conndiaocha_STRING
Recordset1.Source = "SELECT * FROM diaocha"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
调查dim score(4)
dim yscore(4)
dim tscore(4)
Recordset1.MoveFirst
dim total
For i=1 to 3
score(i)=Recordset1("票数")
tscore(i)=score(i)
total=total+score(i)
Recordset1.MoveNext
If Recordset1.Eof then Exit For
Next
average=int(total/3)
tscore(4)=average
score(4)=average
dim max
max=0
For i=1 to 4
If max
Next
For i=1 to 4
score(i)=int(80/max*score(i))
Next
For i=1 to 4
If score(i)>=400 then
yscore(i)=0-(score(i)-40)
else
yscore(i)=40-score(i)
End IF
Next
%>
"
Response.write ""
%>
Response.write ""
%>
Response.write ""
%>
Response.write ""
%>
整体布局() | |
美工制作() | |
应用程序() | |
平均票数() |
关闭窗口
Recordset1.Close()
%>