3D 파이 차트 기능의 생성을 용이하게하기 위해 ASP에서 3D 파이 차트를 생성하기 위해 기능 코드를 수집하여 모든 사람이 특별한 상황에서 사용하기 편리합니다.
<%
'매개 변수 의미 (배열, 수평 좌표, 수직 좌표, 차트 너비, 차트 높이, 차트 제목, 단위)
functionTable2 (stat_array, table_left, table_top, all_width, all_height, table_title, unit)
dimbg_color (10), 파이 (10)
bg_color (1) = "#ff1919"
bg_color (2) = "#ffff19"
bg_color (3) = "#1919ff"
bg_color (4) = "#19ff19"
bg_color (5) = "#fc0"
bg_color (6) = "#3cc"
bg_color (7) = "#ff19ff"
bg_color (8) = "#993300"
bg_color (9) = "#f60"
bg_color (10) = "#ff8c19"
num = ubund (stat_array, 1)
allValues = 0
fori = 1tonum
allValues = allValues+stat_array (i, 1)
다음
k = 0
fori = 1tonum-1
Pie (i) = FormatNumber (stat_array (i, 1)/allValues, 4, -1)
k = k+파이 (i)
다음
Pie (num) = FormatNumber ((1-K), 4, -1)
응답. "<v : shapeTypeId = 'Cake_3d'CoordSize ='21600,21600'O : SPT = '95'ADJ ='11796480,5400'Path = 'al10800,10800@0@2@14,10800,10800,10800@3@15xe'> </v : shapetupe '>.
응답. "<v : shapeTypeId = '3dtxt'CoordSize ='21600,21600'O : spt = '136'adj ='10800'Path = 'm@7, l@8, m@5,21600L@6,21600e'>."
응답. "<v : pathtextPathok = 't'o : connectType ='custom'o : connectLocs = '@9,0;@10,10800;@11,21600;@12,10800'o : connectAngles ='270,180,90,0 '/>"
response.write "<v : textPathon = 't'fitshape ='t '/>"
response.write "<o : lockv : ext = 'edit'text ='t'shapetype = 't'/>"
응답. "</v : shapeType>"
응답. "<v : rectid = 'background'style ='위치 : 절대; 왼쪽 :"& table_left & "px; top :"& table_top & "px; width :"& all_width & "px; 높이 :"& all_height & "px;
response.write "<v : shadowon = 't'type ='single'color = 'silver'offset ='4pt, 4pt '/>"
응답. "</v : rect>"
response.write "<v : groupid = 'table'style ='위치 : 절대; 왼쪽 :"& table_left & "px; top :"& table_top & "px; width :"& all_width & "px; 높이 :"& all_height & "px; 'coordsize ='21000,11500 '>"
응답. "<v : rectstyle = '위치 : 상대; 왼쪽 : 500; 상단 : 200; 너비 : 20000; 높이 : 800'filled ='false'stroked = 'false'>"
response.write "<v : textboxinset = '0pt, 0pt, 0pt, 0pt'>"
response.write "<tablewidth = '100%'border = '0'align ='Center'CellSpacing = '0'>"
response.write "<tr>"
response.write "<tdalign = 'center'valign ='middle '> <divstyle ='font-size : 15pt; font-family : bold; '> <b>"& table_title & "</b> </div> </td>"
응답. "</tr>"
response.write "</table>"
응답. "</v : textbox>"
응답. "</v : rect>"
응답. "<v : rectid = 'back'style ='위치 : 상대; 왼쪽; 왼쪽 : 500; 상단 : 1000; 너비 : 20000; 높이 : 10000;
응답. "<v : fillrotate = 't'angle ='-45'focus = '100%'type = 'Gradient'/>"
응답. "</v : rect>"
응답. "<v : rectid = 'back'Style ='위치 : 상대; 왼쪽 : 왼쪽 : 15000; 상단 : 1400; 너비 : 5000; 높이 :"& ((num+1)*9000/11+200) & ";
응답. "<v : fillrotate = 't'angle ='-175'focus = '100%'type = 'Gradient'/>"
response.write "<v : shadowon = 't'type ='single'color = 'silver'offset ='3pt, 3pt '/>"
응답. "</v : rect>"
응답. "<v : rectstyle = '위치 : 상대; 왼쪽; 왼쪽 : 15500; 상단 : 1500; 너비 : 4000; 높이 : 700'FillColor ='#000000'Stroked = 'f'strokeColor ='#000000 '>"
response.write "<v : textboxset = '8pt, 4pt, 3pt, 3pt'style ='font-size : 11pt; '> <divalign ='left '> <fontcolor ='#ffffff '> <b> Total :"& allValues & un </b> </font> </div> </v : Textbox> "
응답. "</v : rect>"
fori = 1tonum
응답. "<v : rectid = 'rec"& i & "'style = '위치 : 상대; 왼쪽 : 15400; 상단 :"& i*9000/11+1450 & "; 너비 : 4300; 높이 : 800; 디스플레이 : none'fillcolor ='#efefef'StrokeColor = '"& bg_color (i) & "'>
응답. "<v : fillopacity = '. 6'color2 ='filldarken (118) 'o : exacity2 ='. 6'rotate = 't'method ='linearsigma'focus = '100%'type = 'gradient'/>.
응답. "</v : rect>"
응답. "<v : rectstyle = '위치 : 상대; 왼쪽 : 15500; 상단 :"& i*9000/11+1500 & "; 너비 : 600; 높이 : 700'fillcolor ='"& bg_color (i) & " 'stroked ='f '/>" "/>"
응답. "<v : rectstyle = '위치 : 상대; 왼쪽 : 16300; 상단 :"& i*9000/11+1500 & "; 너비 : 3400; 높이 : 700'filled ='f'stroked = 'f'>"
응답. "<v : textboxset = '0pt, 5pt, 0pt, 0pt'style ='font-size : 9pt; '> <divalign ='left '>"& stat_array (i, 2) & ":"& stat_array (i, 1) & init & "</div> </v : textbox>"
응답. "</v : rect>"
다음
응답. "</v : group>"
K1 = 180
K4 = 10
fori = 1tonum
response.write "<ahref = aaa.asp>"
K2 = 360*파이 (I)/2
K3 = K1+K2
ifk3> = 360then
K3 = K3-360
endif
KKK = (-111796480*파이 (I) +5898240)
K5 = 3.1414926*2*(180- (K3-180))/360
r = all_height/2
txt_x = table_left+all_height/8-30+r+r*sin (k5)*0.7
txt_y = table_top+all_height/14-39+r+r*cos (k5)*0.7*0.5
titlest = "이름 :"& stat_array (i, 2) & "value :"& stat_array (i, 1) & init & "백분율 :"& pie (i)*100 & "%"
response.write "<divstyle = 'cursor : hand;'>"
response.write "<v : shapeid = 'cake"& i & "'type = '#cake_3d'title ='& titlestr &" ' "
응답. "style = '위치 : 절대; 왼쪽 :"& table_left+all_height/8 & "px; px; 상단 :"& table_top+all_height/"px; 너비 :"& all_height & "px; 높이 :"& all_height & "px; rotation :"& k3 & "; z-index : & k4 &" ""
response.write "adj = '"& kkk & ", 0'fillcolor ='"& bg_color (i) & " 'onmouseover ='moveup (cake"& i & ","& (table_top+all_height /14) & ", txt"& i & ", rec"& i & ") '; onMouseOut ='mizyn (케이크"& i & ","& (table_top+all_height/14) & ", txt"& i & ", rec"& i & "); '>";
응답. "<v : fillopacity = '60293f'color2 ='filllighten (120) 'o : 불투명도 ='60293f'rotate = 't'angle ='-135'Method = 'linearsigma'focus ='100%'type ='gradient '/>"
response.write "<o : enxtrusionv : ext = 'view'on ='t'backdepth = '25'RotationAgn ='60'ViewPoint = '0,0'ViewPointOrigin ='0,0'Skewamt = '0'LightPosition ='-50000, -50000'lightPosition2 = '50000'/>"
응답. "</v : shape>"
응답. "<v : shapeid = 'txt"& i & "'type = '#3dtxt'style ='위치 : 절대; 왼쪽 :"& txt_x & "px; 상단 :"& txt_y & "px; z-index : 20; display : 없음; 너비 : 50;
response.write "OnMouseOver = 'ontxt (Cake"& I & ","& (table_top+all_height/14) & ", txt"& i & ", rec"& i & ")'>"
응답. "<v : fillopacity = '60293f'color2 ='filllighten (120) 'o : 불투명도 ='60293f'rotate = 't'angle ='-135'Method = 'linearsigma'focus ='100%'type ='gradient '/>"
response.write "<v : textPathStyle = 'font-family :'安 '; v-text-kern : t'trim ='t'fitpath = 't'string ='& pie (i)*100 &"%'/> "
response.write "<o : enxtrusionv : ext = 'view'backdepth ='8pt'on = 't'lightPosition ='0,0'lightPosition2 = '0,0'/>"
응답. "</v : shape>"
response.write "</div>"
K1 = K1+K2*2
ifk1> = 360then
K1 = K1-360
endif
ifk1> 180then
K4 = K4+1
또 다른
K4 = K4-1
endif
response.write "</a>"
다음
최종 기능 장애
%>
<htmlxmlns : v = "urn : schemas-microsoft-com : vml"xmlns : o = "urn : schemas-microsoft-com : Office : Office">
<헤드>
<제목> </title>
<스타일>
v/:*{동작 : URL (#default#vml)}
o/:*{동작 : URL (#default#vml)}
</스타일>
</head>
<body>
<scriptLanguage = "JavaScript">
<!-
onit = true
num = 0
functionMoveUp (iteam, top, txt, rec) {
임시 = 평가 (ITEAM)
tempat = 평가 (상단)
temptxt = eval (txt)
temprec = Eval (Rec)
at = parseint (temp.style.top)
temprec.style.display = "";
if (num> 27) {
temptxt.style.display = "";
}