ASP генерирует тела в форме столбца, линейные диаграммы, исходный код круговой диаграммы
<%
functiontable2 (total, table_x, table_y, all_width, all_height, line_no)
«Значение параметра (пропущенная массива, горизонтальная координата, вертикальная координата, ширина диаграммы, высота диаграммы, количество линий)
'Pure ASP -код генерирует функцию диаграммы 2 - линейная диаграмма
'Автор: Gong Ming (PasswordGM) QQ: 25968152msn: [email protected]: [email protected]
«Я очень готов общаться и обсудить с энтузиастами ASP, VML и Flash на http://topclouds.126.com
Версия 1.0 Последняя модифицированная дата 2003-8-11
«Большое спасибо за использование этой функции. Пожалуйста, сохраните информацию об авторском праве при использовании и перепечатках. Это лучшее уважение к работе автора.
line_color = "#69f"
Leats_width = 70
Total_no = ubund (всего, 1)
temp1 = 0
fori = 1tototal_no
forj = 1toline_no
iftemp1 <total (i, j) thentemp1 = total (i, j)
следующий
следующий
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)
еще
temp3 = (int (temp1/(10^(len (cstr (temp1))-1)))+0,5)*10^(len (cstr (temp1))-1)
эндиф
еще
iftemp1> 4thentemp3 = 10elsetemp3 = 5
эндиф
temp4 = temp3
response.write "<v: rectid = '_ x0000_s1027'alt =' 'style =' position: Absolute; слева:" & table_x+leat_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 =' градиент '/> </v: rect>"
fori = 0toall_height-1stepall_height/5
response.write "<v: lineid = '_ x0000_s1027'alt =' 'style =' Положение: абсолютно; слева: 0; текстовый альген: слева; Верх: 0; flip: y; z-index: -1'from = '" & table_x+leat_width+le ngth & "px," & table_y+all_height-length-i & "px'to = '" & table_x+all_width+leat_width & "px," & table_y+all_height-length-i & "px'strokecolor ='" & line_color & "/'/>"
response.write "<v: lineid = '_ x0000_s1027'alt =' '' style = 'Положение: абсолют; слева: 0; текстовой алюна: слева; Верх: 0; Flip: y; z- ИНДЕКС: -1'from = '"& table_x+(LEATE_WIDTH-15) &" PX, "& TABLE_Y+I &" PX'TO =' "& table_x+LEAD_WIDTH &" PX, "& TABLE_Y+I &" PX '/> "
response.write ""
response.write "<v: shapeid = '_ x0000_s1025'type ='#_ x0000_t202'alt = '' 'style =' Положение: абсолют; слева:" & table_x & "px; top:" & table_y+i & "px; width:" & left_width & "px; z-18px; z-index: 1 '>"
response.write "<v: TextBoxInset = '0px, 0px, 0px, 0px'> <tablecellspacing = '3'cellpadding =' 0'width = '100%' height = '100%'> <tdalign = 'справа'>" & temp4 & "</td> </tr> </table> </v: textbox> </vmo и" </td> </tr> </table> </v: textbox> </vmo и "</td> </tr> </table>
temp4 = temp4-temp3/5
следующий
response.write "<v: lineid = '_ x0000_s1027'alt =' 'style =' Положение: абсолютно; слева: 0; текстовый азобие: слева; Верх: 0; flip: y; z-index: -1'fro m = '"& table_x+leat_width &" px, "& table_y+all_height &" px'to =' "& table_x+all_width+leat_width &" px, "& table_y+all_height &" px '/> "