ASP는 열 모양의 몸체, 라인 차트, 파이 차트 소스 코드를 생성합니다.
<%
functionTable2 (Total, Table_X, Table_Y, All_Width, All_Height, line_no)
'매개 변수 의미 (전달 된 배열, 수평 좌표, 수직 좌표, 차트 너비, 차트 높이, 선 수)
'순수 ASP 코드 생성 차트 기능 2- 라인 차트
'저자 : Gong Ming (passwordgm) QQ : 25968152msn : [email protected] : [email protected]
'http://topclouds.126.com에서 ASP, VML 및 플래시 애호가와 의사 소통하고 토론 할 의향이 있습니다.
'버전 1.0 마지막 수정 날짜 2003-8-11
'이 기능을 사용해 주셔서 대단히 감사합니다. 사용 및 재 인쇄시 저작권 정보를 보관하십시오. 이것은 저자의 작품에 대한 최선의 존중입니다.
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)
다음
다음
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)
endif
또 다른
iftemp1> 4thentemp3 = 10elsetemp3 = 5
endif
temp4 = temp3
response.write "<v : rectid = '_ x0000_s1027'alt =' 'style ='위치 : 절대; 왼쪽 :"& table_x+left_width & "px; top :"& table_y & "px; width :"& all_width & "px; 높이 :"& 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
응답. "<v : lineid = '_ x0000_S1027'Alt =' 'style ='위치 : 절대; 왼쪽; 왼쪽 : 0; 텍스트-알림 : 왼쪽; 상단; flip : y; z-index : -1'from = '"& table_x+left_width+le ngth & "px,"& table_y+all_height-length-i & "px'to = '"& table_x+all_width+left_width & "px,"& table_y+all_height-length-i & "px'strokecolor ='& line_color &" '/> "
응답. "<v : lineid = '_ x0000_S1027'Alt =' 'style ='위치 : 절대; 왼쪽 : 0; 텍스트-정렬 : 왼쪽; 상단 : 0; 플립 : y; z- 색인 : -1'from = '& table_x+(left_width-15) & "px,"& table_y+i & "px'to ='"& table_x+left_width & "px,"& table_y+i & "px '/>"
response.write ""
응답. "<v : shapeid = '_ x0000_s1025'type ='#_ x0000_t202'alt = 'style ='style = 'style ='position : 절대; 왼쪽 :"& table_x & "px; top :"& table_y+i & "px; width :"& left_width & "px; z-index : 1 '>"
응답. "<v : textboxinset = '0px, 0px, 0px, 0px'> <tablecellspacing = '3'CellPadding ='0'Width = '100%'height = '100%'> <tdalign = 'right'>"& temp4 & "</td> </table> </v : textbox> </v : :
temp4 = temp4-temp3/5
다음
응답. "<v : lineid = '_ x0000_s1027'alt =' 'style ='위치 : 절대; 왼쪽; 왼쪽 : 0; 텍스트-정렬 : 왼쪽; 상단 : 0; 플립 : y; z-index : -1'fro M = '& table_x+left_width & "px", & table_y+all_height & "px'to ='"& table_x+all_width+left_width & "px"& table_y+all_height & "px '/>"