Demo Address:
Http://61.172.255.65/dvbbs/t3/t17.asp
<%
Dim Total (7,2)
Total (1,1) =200
Total (2,1) =800
Total (3,1) =1000
Total (4,1) =600
Total (5,1) =1222
Total (6,1) =3213
Total (7,1) =8
Total (1,2) = "China Business Report"
Total (2,2) = "Recruitment network"
Total (3,2) = "51Job"
Total (4,2) = "Xinmin Evening News"
Total (5,2) = "Evening News"
Total (6,2) = "Southern Weekend"
Total (7,2) = "Yangcheng Evening News"
Total_no=7
%>
<!--[If!mso]>
<style>
V\:* {behavior:url (#default #vml)}
O\:* {behavior:url (#default #vml)}
. Shape {Behavior:url (#default #vml)}
</style>
<! [endif]-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title></title>
<style>
TD {font-size:9pt}
</style><body topmargin=5 leftmargin=0 scroll=auto>
<%call table1 (total,200,20,20,30,400,200, "A")%>
<%call table1 (total,200,320,20,20,400,250, "B")%>
</body>
<%
function table1 (total,table_x,table_y,thickness,table_width,all_width,all_height,table_type)
' parameter meaning (passed array, horizontal axis, ordinate, column thickness, column width, chart width, chart height, chart type)
' Pure ASP code generation chart function 1--bar chart
' Author: 龚鸣 (PASSWORDGM) qq:25968152 msn:passwordgm@sina.com email:passwordgm@sina.com
I am very willing to communicate and discuss with Asp,vml,flash enthusiasts in HTTP://topclouds.126.com.
' Version 2.0 last modification date 2003-7-22
' Thank you very much for using this function, please keep the copyright information when you use and reprint, which is the best respect for the author's work.
Dim Tb_color (7,2)
Tb_color (1,1) = "#d1ffd1"
Tb_color (2,1) = "#ffbbbb"
Tb_color (3,1) = "#ffe3bb"
Tb_color (4,1) = "#cff4f3"
Tb_color (5,1) = "#d9d9e5"
Tb_color (6,1) = "#ffc7ab"
Tb_color (7,1) = "#ecffb7"
Tb_color (1,2) = "#00ff00"
Tb_color (2,2) = "#ff0000"
Tb_color (3,2) = "#ff9900"
Tb_color (4,2) = "#33cccc"
Tb_color (5,2) = "#666699"
Tb_color (6,2) = "#993300"
Tb_color (7,2) = "#99cc00"
Line_color= "#69f"
Left_width=70
Length=thickness/2
Total_no=ubound (total,1)
Temp1=0
For I=1 to Total_no
If Temp1<total (i,1) then Temp1=total (i,1)
Next
Temp1=int (TEMP1)
If Temp1>9 Then
Temp2=mid (CStr (TEMP1), 2, 1)
If Temp2>4 Then
temp3= (int (temp1/(10^ len (TEMP1)-1)) +1) *10^ (Len (CStr (TEMP1))-1)
Else
temp3= (int (temp1/(10^ len (TEMP1)-1)) +0.5) *10^ (Len (CStr (TEMP1))-1)
End If
Else
If Temp1>4 then temp3=10 else temp3=5
End If
Temp4=temp3
Response.Write "<!--[GTE VML 1]><v:rect id= ' _x0000_s1027 ' alt= ' style= ' position:absolute;left ':" & table_x+left_width& "Px;top:" &table_y& "Px;width:" &all_width& "Px;height:" &all_height & "Px;z-index:-1 ' fillcolor= ' #9cf ' stroked= ' F ' ><v:fill rotate= ' t ' angle= ' -45 ' focus= ' 100% ' type= ' gradient '" ></v:rect><! [endif]--> "
Response.Write "<!--[if GTE VML 1]><v:line id= ' _x0000_s1027 ' alt= style= ' position:absolute;left:0 '; Text-align:left;top:0;flip:y;z-index:-1 ' from= ' "&table_x+left_width&" px, "&table_y+all_height&" px ' to= ' "&table_x+all_width+left_width&" px, "&table_y+all_height&" px '/><! [endif]--> "
Response.Write "<!--[if GTE VML 1]><v:line id= ' _x0000_s1027 ' alt= style= ' position:absolute;left:0 '; Text-align:left;top:0;flip:y;z-index:-1 ' from= ' "&table_x+left_width&" px, "&table_y&" px ' to= ' &table_x+left_width& "px," &table_y+all_height& "px"/><! [endif]--> "
Select Case Table_type
Case "A"
Table_space= (all_width-table_width*total_no)/total_no
Response.Write "<!--[if GTE VML 1]><v:line id= ' _x0000_s1027 ' alt= style= ' position:absolute;left:0 '; Text-align:left;top:0;flip:y;z-index:-1 ' from= ' &table_x+left_width+length& px, ' &table_y& ' px ' to = ' "&table_x+left_width+length&" px, "&table_y+all_height-length&" px ' strokecolor= ' "&line_ color& "'/><! [endif]--> "
For i=0 to All_height-1 step ALL_HEIGHT/5
Response.Write "<!--[if GTE VML 1]><v:line id= ' _x0000_s1027 ' alt= '" style=