Pure ASP code generation graphics

xiaoxiao2021-03-06  66

<% Function Table1 (TABLE_X, TABLE_Y, Thickness, Table_Width, All_TYPE "parameter meaning (passing array, horizontal coordinate, ordinate, thickness of the column, the width of the column, the width of the chart, the height of the chart , the type of chart) 'pure ASP code generator function 1-- chart histograms' author: Gong Ming (Passwordgm) QQ: 25968152 MSN: passwordgm@sina.com Email: passwordgm@sina.com' I am very willing and ASP, VML Flash's enthusiasts in http://topclouds.126.com and explore the 'version 2.0 final modification date 2003-7-22' Thank you for using this function, please reserve copyright information when you use and reprint, this is The best respect for the author's work. DIM TB_COLOR (7, 2) TB_COLOR (1, 1) = "# D1FFD1" TB_COLOR (2, 1) = "# ffbbb" 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 = 70Length = thickness / 2total_no = ubound (Total, 1)

Temp1 = 0for i = 1 to total_noif temp1 9 THENTEMP2 = MID (CSTR (TEMP1), 2, 1) IF TEMP2 > 4 TEMP3 = (INT (Temp1 / (10 ^ (LEN (CSTR (TEMP1)) - 1))) 1) * 10 ^ (LEN (CSTR (TEMP1)) - 1) Else Temp3 = (int (TEMP1 /(10^ (leen(CSTR (temp1 )) 1)) 0.5)*10^ (leen(cstr (temp1)) 1) 11END IFELSEIF TEMP1> 4 TEMP3 = 10 else Temp3 = 5END iftemp4 = Temp3Response .write "response.write" " response.write " "

select case table_typecase "A" table_space = (all_width-table_width * total_no) /total_noresponse.write "- : 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 & "'/> " for i = 0 to all_height-1 step all_height / 5Response.write " ! [[ndif] -->"Response.write" " response.write " <

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-15) & "PX," & Table_Y I & "PX 'to ='" & Table_X LEFT_WIDTH & "PX," & Table_Y I & "PX '/> " Response.write " "response.write" " response.write "

"& TEMP4 &" "temp4 = TEMP4-TEMP3 / 5NEXTFOR I = 1 to total_notemp_space = TABLE_X LEFT_WIDTH TABLE_SPACE / 2 TABLE_SPACE * (i-1) Table_Width * (i- 1) Response.write "" Response.Write "

Rotate = 'T' Type = 'gradient' /> "response.write" "response.write" "response.write" "response.write"

"& Total (i, 1) &" "

response.write " "Response.Write"

"& Total (i, 2) &" "Nextcase" B "Table_Space = (all_height-table_width * total_no) /total_noresponse.write" <[endif] -!>" for i = 0 TO All_Width-1 Step All_Width / 5Response.write "

All_height & "px 'strokecolor ='" & line_color & "'/> " response.write " >>> [indif] -->"Response.write "" Response.write " "response.write"

> "& Temp4 &" "TEMP4 = TEMP4-TEMP3 / 5NEXT

For i = 1 to total_notemp_space = Table_Space / 2 Table_Space * (i-1) Table_WIDTH * (I-1) Response.write " "response.write" " response.write "" response.write " "response.write"

"& Total (i, 1) & "

response.write "" response.write "

& Total (i, 2) & " "Nextcase Elsend SelectEnd Function%>

<% Function Table2 (Total, Table_x, Table_Y, ALL_WIDTH, ALL_HEIGHT, LINE_NO) 'parameter meanings (the array of transverse, horizontal coordinates, longitudinal coordinates, the width of the graph, the height of the chart)' pure ASP code generates a graphic function 2-- line chart 'author: Gong Ming (Passwordgm) QQ: 25968152 MSN: passwordgm@sina.com Email: passwordgm@sina.com' I am very willing and ASP, VML, FLASH fans in HTTP: // topclouds. 126.com for communication and discussion 'version 1.0 final modification date 2003-8-11' Thank you for using this function, please keep copyright information when you use and reprint, this is the best respect for the author.

LINE_COLOR = "# 69f" left_width = 70 Total_NO = Ubound (Total, 1)

Temp1 = 0for i = 1 to Total_nofor j = 1 to line_no if temp1 9 THENTEMP2 = MID (CSTR (TEMP1), 2, 1) IF TEMP2> 4 THEN TEMP3 = (INT (Temp1 / (10 ^ (LEN (CSTR (TEMP1)) - 1))) 1) * 10 ^ (LEN (CSTR (TEMP1) - 1) ELSE Temp3 = (INT (Temp1 / (10 ^ (len (CSTR (TEMP1)) - 1))) 0.5) * 10 ^ (len (CSTR (TEMP1)) - 1) end ifelseif temp1> 4 THEN TEMP3 = 10 ELSE Temp3 = 5nd iftemp4 = temp3Response.write " "for i = 0 to all_height-1 step all_height / 5response.write" "response.write" "Response.write" "response.write" "response.write"

"& TEMP4 &" "Temp4 = Temp4-Temp3 / 5NextResponse.write" "response.write ""

DIM line_coderedim line_code (line_no, 5) for i = 1 to line_noline_temp = split (Total (0, i), ",") line_code (i, 1) = line_temp (0) line_code (i, 2) = line_temp (1) LINE_CODE (I, 3) = line_temp (2) line_code (i, 4) = line_temp (3) line_code (i, 5) = line_temp (4) Nextfor J = 1 to line_nofor i = 1 to total_no-1 x1 = Table_x left_width all_width * (i-1) / total_no y1 = table_y (temp3-total (i, j)) * (all_height / temp3) x2 = table_x left_width all_width * i / total_no y2 = table_y (temp3-total (i 1, J)) * (all_height / temp3) response.write ""> ">" Select Case Line_code (j, 3) Case 1 Case 2 Response.write "case 3 response.write" "case 4 response.write" "Case 5 Response. Write " "Case 6 Response.Write" "case 7 response.write" "Case else end select response.write "&

CHR (13) Select Case Line_code (J, 4) Case 1 Case 2 Response.write " "& Chr (13) case 3 response.write" "& chr (13) End SelectNext SELECT CASE LINE_CODE (J, 4) Case 1 Case 2 Response.write "" "& chr (13) End SelectNext

FOR i = 1 to total_noresponse.write " "Response.write" "response.write" "response.write

& Total (i, 0) & "" nexttb_height = 30RESPONSE.WRITE " "for i = 1 to line_noresponse.write" "response.write"
"& line_code (i, 5) &" "response.write" "Nextend Function%>

<% Function Table3 (TOTAL, TABLE_X, TABLE_Y, All_TYPE_TYPE) 'Parameter (Passage, horizontal coordinate, longitudinal coordinates, width of horizontal coordinates, highness of chart, graphic type)' pure ASP code generation chart function 3-- pie 'author: Gong Ming (Passwordgm) QQ: 25968152 MSN: passwordgm@sina.com Email: passwordgm@sina.com' I am very willing and ASP, VML, FLASH fans in HTTP: // topclouds. 126.com for communication and discussion 'version 1.0 final modification date 2003-8-11' Thank you for using this function, please keep copyright information when you use and reprint, this is the best respect for the author. TB_HEIGHT = 30dim tb_color (7, 2) TB_COLOR (1, 1) = "# D1ffd1" TB_COLOR (2, 1) = "# ffbbb" 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"

Total_no = ubound (Total, 1) Totalpie = 0for i = 1 to Total_nototalpie = Totalpie Total (i, 1) Next

PreAngle = 0for i = 1 to total_noresponse.write " "& chr (13) preactor = preangle Total (i, 1) / TotalpieNext

if Table_Type = "a" TenResponse.write " "for i = 1 to Total_NORESPONSE.WRITE" "response.write"

& Total (i, 0) & "" Response.write " ' 'display ratio' response.write ""' response.write "
& FormatNumber (Total (i, 1) * 100 / Totalpie, 2, -1) & "% " Nextend IF

if Table_Type = "B" THENPIE = 3.14159265358979Temppie = 0for i = 1 to Total_NotemPangle = PIE * 2 * (Total (i, 1) / (Totalpie * 2) TEMPPIE) X1 = Table_X All_Width / 2 Cos (Tempangle) * all_width * 3 / 8y1 = table_y all_height / 2-sin (TempAngle) * all_height * 3 / 8x2 = table_x all_width / 2 cos (TempAngle) * all_width * 3 / 4y2 = table_y all_height / 2-sin (TempAngle ) * all_height * 3 / 4IF X2> Table_x all_width / 2 THEEN X3 = x2 20 x4 = x3100nd = x2-20 x4 = x3-100nd ifresponse.write " " & Chr (13) response.write " " Response.write " "response.write" "response.write"

" temptem = Temppie Total (i, 1) / Totalpienextend ifend function%>

Pure ASP code generation chart function 1 - column chart: <% DIM TOTAL (7, 2) Total (1, 1) = 200total (2, 1) = 800Total (3, 1) = 1000 Total (4, 1) = 600Total (5, 1) = 1222 Total (6, 1) = 3213 Total (7, 1) = 8

Total (1,2) = "China Business News" Total (2, 2) = "Recruitment Network" Total (3, 2) = "51Job" Total (4, 2) = "New People's Evening News" Total (5, 2) = "News Evening" Total (6, 2) = "Southern Weekend" Total (7, 2) = "Yangcheng Evening News"

Total_no = 7%>