Dynamic charts on the web page have always been a lot of things that a web programmer feels very headaches. After a period of research on VML, it was found that it was still very convenient to implement the chart on the HTML page. Now I will send me a three-dimensional statistical figure that I implemented with ASP VML to everyone, I hope to help everyone. (If you want to pay, please still keep my name, after all, I spent a lot of time working outcomes. :))
First of all, the simplest ------ histogram
Column status
yuan
2500
2000
1500
1000
500
200
Project 1
800
Project 2
1004
Project 3
600
Project 4
1222
Project 5
2100
Project 6
80
Project 7
1002
Project 8
145
Project 9
1040
Project 10
<%
'┏┏━━━━━━━━━━━━━━━━━━━━┓┓┓┓┓
'
'Abstract: statistics - histogram
'Consumers: Weng Yunbing
'Caution date: November 5th, 2004
'Completion date: November 5, 2004
'
'┗┗━━━━━━━━━━━━━━━━━━━━┛┛┛┛┛
'Parameter meanings (array, horizontal coordinate, longitudinal coordinate, width, graphic height, chart title, X-axis unit, Y-axis unit)
Function Table1 (Stat_Array, Table_LID, TABLE_TOP, All_WIDTH, ALL_HEIGHT, TABLE_TILE, X_UNIT, Y_UNIT)
DIM BG_COLOR (10)
BG_COLOR (1) = "# ff1919"
BG_COLOR (2) = "# fff19"
BG_COLOR (3) = "# 1919ff"
BG_COLOR (4) = "# 19ff19"
BG_COLOR (5) = "# fc0"
BG_COLOR (6) = "# 3cc"
BG_COLOR (7) = "# ff19ff"
BG_COLOR (8) = "# 993300"
BG_COLOR (9) = "# f60"
BG_COLOR (10) = "# ff8c19"
IF X_Unit <> "" ""
X_Unit = X_Unit
END IF
IF Y_Unit <> "" "
Y_Unit = y_Unit
END IF
Num = ubound (stat_array, 1)
item_width = cint (20000 / NUM 0.5)
Begin_x = CINT ((item_width-1200) / 2) 2200
VALUE_MAX = 0
For i = 1 to Num
IF value_max NEXT VALUE_MAX = CINT (value_max) VALUE_MAX_STR = CSTR (value_max) IF value_max> 9 THEN Temp = MID (value_max_str, 2, 1) IF TEMP> 4 THEN Temp2 = (int (value_max / (10 ^ (LEN (value_max_str) -1))))))) 1) * 10 ^ (LEN (Value_max_STR) -1) Else Temp2 = (int (Value_max / (10 ^ (LEN (Value_max_STR) -1))))) 0.5) * 10 ^ (LEN (Value_max_STR) -1) END IF Else IF value_max> 4 TEMP2 = 10 else temp2 = 5 END IF Item_Hight = Temp2 / 5 Response.write " response.Write " Response.write " Response.write " v: Rect>" response.Write " Response.write " Response.write " Response.write " Response.write " Response.write " "response.write"
"response.write"