ASP generates column, folding chart, pie, pie, pie, cake

xiaoxiao2021-03-06  52

<% 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 at http: // topclouds. 126.COM/ Explore the "Version 1.0 Final Modification Date 2003-8-11" Thank you very much 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

NEXT

NEXT

Temp1 = int (TEMP1)

IF TEMP1> 9 THEN

TEMP2 = 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 IF

Else

IF TEMP1> 4 TEMP3 = 10 else temp3 = 5

END IF

TEMP4 = TEMP3

Response.write "

"

For i = 0 to all_height-1 step all_height / 5

Response.write "

"

Response.write "

"

Response.write ""

Response.write "

"

Response.write "

"& Temp4 &"

TEMP4 = TEMP4-TEMP3 / 5

NEXT

Response.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)? Case 3 ?? response.write"

"& Chr (13)? End SelectNext

For i = 1 to total_noresponse.write "

"Response.write" "response.write"

"

Response.write "

& Total (i, 0) & ""

NEXT

TB_HEight = 30RESPONSE.WRITE "

"for i = 1 to line_noresponse.write"

"

Response.write "

"& line_code (i, 5) &"

Response.write "

"

NEXT

End function%>

?

<% 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/Conced and discuss 'version 2.0 final modification date 2003-7-22' Thank you for using this function, please keep copyright information when you use and reprint, this It 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

NEXT

Temp1 = int (TEMP1)

IF TEMP1> 9 THEN

TEMP2 = 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 IF

Else

IF TEMP1> 4 TEMP3 = 10 else temp3 = 5

END IF

TEMP4 = TEMP3

Response.write "

"

Response.write "

"

Response.write "

"

SELECT CASE TABLE_TYPECASE "a" Table_Space = (all_width-table_width * total_no) /total_noresponse.write "

"for i = 0 to all_height-1 step all_height / 5Response.write"

"Response.write"

"Response.write"

"Response.write"

"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 "

"

Response.write "

"

Response.write "

"Response.write"

"

Response.write "

& Total (i, 1) & ""

Response.write "

"

Response.write "

& Total (I, 2) & ""

NEXT

Case "B"

Table_space = (all_height-table_width * total_no) / Total_no

Response.write "

"

For i = 0 to all_width-1 step all_width / 5

Response.write "

"

Response.write "

"

Response.write "

"

Response.write "

"

TEMP4 = TEMP4-TEMP3 / 5

NEXT

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"

"

Response.write "

& Total (i, 1) & ""

Response.write "

"

Response.write "

& Total (I, 2) & ""

NEXT

Case Else

End SELECT

End 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) NextPreangle = 0for i = 1 to Total_NORESPONSE.WRITE" " & Chr (13) Preangle = Preangle Total (i, 1) / Totalpienextif Table_Type = "a" TenResponse.write "

"for i = 1 to total_noresponse.write"

"

Response.write "

& Total (i, 0) & ""

Response.write "

"

'Show number

'Response.write "

"

'Response.write "

"& FormatNumber (Total (i, 1) * 100 / Totalpie, 2, -1) &"%

"

NEXT

END IF

if Table_Type = "B" THEN

PIE = 3.14159265358979

TEMPPIE = 0

For i = 1 to Total_no

Tempangle = 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/8

X2 = Table_X All_Width / 2 Cos (Tempangle) * all_width * 3/4

Y2 = Table_Y All_HEight / 2-SIN (Tempangle) * All_Height * 3/4

IF x2> Table_x all_width / 2 THEN

?? x3 = x2 20

?? x4 = x3

Else

?? x3 = x2-20

?? x4 = x3-100

END IF

Response.write "

"& Chr (13)

Response.write "

"

Response.write "

"

Response.write "

"

Response.write "

& Total (I, 0) & "& FormatNumber (Total (i, 1) * 100 / Totalpie, 2, -1) &"%

"

Temppie = Temppie Total (i, 1) / Totalpie

NEXT

END IF

END 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%>

TD {font-size: 9pt} <% Call Table1 (Total, 200, 20, 20, 30, 400, 200, "A")%> <% Call Table1 (Total, 200, 320, 20, 20, 400, 250, "B")%>

转载请注明原文地址:https://www.9cbs.com/read-117561.html

New Post(0)