L'ASP génère des corps en forme de colonne, des graphiques de ligne, un code source du graphique à tarte
<%
FunctionTable2 (Total, table_x, table_y, all_width, all_height, line_no)
«Signification des paramètres (tableau passé, coordonnées horizontales, coordonnées verticales, largeur du graphique, hauteur du graphique, nombre de lignes)
«Le code ASP pur génère la fonction du graphique 2 - graphique de ligne
'Auteur: Gong Ming (PasswordGM) QQ: 25968152msn: mot de [email protected]: mot de [email protected]
«Je suis très disposé à communiquer et à discuter avec ASP, VML et passionnés de flash sur http://topclouds.126.com
'Version 1.0 Dernière date modifiée 2003-8-11
«Merci beaucoup d'avoir utilisé cette fonction. Veuillez conserver les informations sur le droit d'auteur lors de l'utilisation et de la réimpression. C'est le meilleur respect pour le travail de l'auteur.
line_color = "# 69f"
Left_Width = 70
Total_no = ubund (total, 1)
temp1 = 0
fori = 1Tototal_no
forj = 1toline_no
ifTemp1 <total (i, j) thentemp1 = total (i, j)
suivant
suivant
temp1 = int (temp1)
ifTemp1> 9Then
temp2 = mid (cSTR (temp1), 2,1)
ifTemp2> 4Then
TEMP3 = (int (temp1 / (10 ^ (Len (Cstr (temp1)) - 1))) + 1) * 10 ^ (Len (Cstr (temp1)) - 1)
autre
TEMP3 = (int (temp1 / (10 ^ (Len (Cstr (temp1)) - 1))) + 0,5) * 10 ^ (Len (Cstr (temp1)) - 1)
endire
autre
ifTemp1> 4Thentemp3 = 10ELSETemp3 = 5
endire
temp4 = TEMP3
réponse.write "<v: rectid = '_ x0000_s1027'alt =' 'style =' position: absolue; 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: fillrotate =' t'angle = '- 45'focus =' 100% 'type =' Gradient '/> </v: rect>"
fori = 0toall_height-1stepall_height / 5
réponse.write "<v: lineid = '_ x0000_s1027'alt =' 'style =' position: Absolute; Left: 0; text-align: Left; top: 0; flip: y; z-index: -1'from = '" & table_x + left_width + le ngth & "px", & table_y + all_height-lingth-i & "px'to = '" & table_x + al_width + Left_width & "px," & table_y + all_height-ligth-i & "px'strokecolor ='" & line_color & "'/>"
réponse.write "<v: lineid = '_ 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 '/> "
réponse.write ""
Response.Write "<v: ShapeID = '_ x0000_S1025'TYPE =' # _ X0000_T202'ALT = '' Style = 'Position: Absolute; Left:" & table_x & "px; top:" & table_y + i & "px; width:" & Left_width & "px; height: 18px; z-index: 1'>"
Response.Write "<V: TextBoxInSet = '0px, 0px, 0px, 0px'> <TableCellSpacing = '3'CellPadding =' 0'Width = '100%' Height = '100%'> <tdalign = 'Right'>" & temp4 & "</td> </tr> </pable> </v: Textbox>
temp4 = temp4-Temp3 / 5
suivant
réponse.write "<v: lineid = '_ x0000_s1027'alt =' 'style =' position: Absolute; Left: 0; Text-Align: Left; top: 0; flip: y; z-index: -1'fro m = '"& table_x + Left_width &" px, "& table_y + all_height &" px'to =' "& table_x + al_width + Left_width &" px, "& table_y + all_height &" px '/> "