Para facilitar a geração de funções de gráfico de pizza 3D, colecionei o código da função para gerar gráficos de pizza 3D no ASP, o que é conveniente para que todos usem em circunstâncias especiais.
<%
'Significado do parâmetro (matriz, coordenada horizontal, coordenada vertical, largura do gráfico, altura do gráfico, título do gráfico, unidade)
functionTable2 (stat_array, tabela_left, tabela_top, all_width, all_height, table_title, unidade)
Dimbg_color (10), torta (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)
próximo
k = 0
fori = 1tonum-1
torta (i) = formatNumber (stat_array (i, 1)/allValues, 4, -1)
k = k+torta (i)
próximo
torta (num) = formatNumber ((1-k), 4, -1)
Response.Write "<V: shapetypeID = 'Cake_3D'CoordSize =' 21600,21600'O: SPT = '95'Adj =' 11796480,5400'Path = 'Al10800,10800@0@0@[email protected],10,10,10800,10800@0@0@2,10800,10,10,10800,10800
Response.Write "<V: shapetypeId = '3dtxt'coordSize =' 21600,21600'O: spt = '136'adj =' 10800'Path = 'm@7, l@8, [email protected]@6.21600e'>"
Response.Write "<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'/>"
Response.Write "</V: Shapetype>"
Response.Write "<V: RectId = 'Background'Style =' Posição: Absolute; esquerda:" & tabela_left & "px; top:" & table_top & "px; largura:" & all_width & "px; altura:" e all_height & "px; 'FillColor ='#efeFeF'Arghecollor =
Response.Write "<V: Shadowon = 'T'type =' single'color = 'Silver'offset =' 4pt, 4pt '/>"
Response.Write "</V: ret>"
Response.Write "<V: groupId = 'tabela'style =' Posição: Absolute; esquerda:" & tabela_left & "px; top:" & table_top & "px; largura:" & all_width & "px; altura:" & all_height & "px; 'coordsize =' 21000,11500 '>" "
Response.Write "<V: Retstyle = 'Posição: relativa; esquerda: 500; topo: 200; largura: 20000; altura: 800'filled =' false'stroked = 'false'>"
Response.Write "<v: textboxinset = '0pt, 0pt, 0pt, 0pt'>"
Response.write "<tabelawidth = '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>"
Response.Write "</tr>"
Response.Write "</ tabela>"
Response.Write "</V: TextBox>"
Response.Write "</V: ret>"
response.Write"<v:rectid='back'style='position:relative;left:500;top:1000;width:20000;height:10000;'onmouseover='movereset(1)'onmouseout='movereset(0)'fillcolor='#9cf'strokecolor='#888888'>"
Response.Write "<V: FILLROTATE = 'T'Angle ='-45'focus = '100%' Type = 'Gradient'/>"
Response.Write "</V: ret>"
Response.Write "<V: RectId = 'Back'Style =' Posição: relativa; esquerda: 15000; topo: 1400; largura: 5000; altura:" & ((num+1)*9000/11+200) & "; 'FillColor ='#9cf'stroked = 't'strokecolor ='#009ff '>.
Response.Write "<V: FILLROTATE = 'T'Angle ='-175'focus = '100%' Type = 'Gradient'/>"
Response.Write "<V: Shadowon = 'T'type =' single'color = 'Silver'offset =' 3pt, 3pt '/>"
Response.Write "</V: ret>"
Response.Write "<V: Retstyle = 'Posição: relativa; esquerda: 15500; topo: 1500; largura: 4000; altura: 700'FillColor ='#000000'Stroked = 'F'strokecolor ='#000000 '>"
Response.Write "<v: textboxset = '8pt, 4pt, 3pt, 3pt'style =' font-size: 11pt; '> <divalign =' esquerda '> <fontcolor ='#ffffff '> <b> Total:" & AllValues & Unit & "</b> </font> </div> </v:
Response.Write "</V: ret>"
fori = 1tonum
response.Write"<v:Rectid='rec"&i&"'style='position:relative;left:15400;top:"&i*9000/11+1450&";width:4300;height:800;display:none'fillcolor='#efefef'strokecolor='"&bg_color(i)&"'>"
Response.Write "<V: FILLOPACIDADE = '. 6'COLOR2 =' FILLDARKEN (118) 'O: opacity2 ='.
Response.Write "</V: ret>"
Response.Write "<V: Retstyle = 'Posição: relativa; esquerda: 15500; topo:" & i*9000/11+1500 & "; largura: 600; altura: 700'FillColor ='" & bg_color (i) & "Stroked = 'f'/>"/> "
Response.Write "<V: Retstyle = 'Posição: relativa; esquerda: 16300; topo:" & i*9000/11+1500 & "; Largura: 3400; Altura: 700'Filled =' F'stroked = 'F'>"
Response.Write "<v: textboxset = '0pt, 5pt, 0pt, 0pt'style =' font-size: 9pt; '> <divalign =' left '>" & stat_array (i, 2) & ":" & stat_array (i, 1) & unit & "</div> </v: textbox>"
Response.Write "</V: ret>"
próximo
Response.Write "</V: Group>"
K1 = 180
k4 = 10
fori = 1tonum
Response.Write "<ahref = aaa.asp>"
k2 = 360*torta (i)/2
k3 = k1+k2
ifk3> = 360then
K3 = K3-360
endif
KKK = (-11796480*PIE (i) +5898240)
K5 = 3.1414926*2*(180- (K3-180))/360
R = All_Height/2
txt_x = tabela_left+all_height/8-30+r+r*sin (k5)*0.7
txt_y = tabela_top+all_height/14-39+r+r*cos (k5)*0,7*0,5
titlestr = "Nome:" & stat_array (i, 2) e "Valor:" & stat_array (i, 1) e unidade e "porcentagem:" & Pie (i)*100 & "%"
Response.Write "<divstyle = 'cursor: Hand;'>"
Response.Write "<V: shapeId = 'Cake" & i & "' type = '#cake_3d'title ='" & titlestr & "'"
Response.Write "Style = 'Posição: Absolute; esquerda:" & tabela_left+all_height/8 & "px; top:" & table_top+all_height/14 & "px; largura:" & all_height & "px; altura:" e all_height & "px; ratation:" & k3 & "Z-Index:"
Response.Write "adj = '" & kkk & ", 0'fillcolor ='" & bg_color (i) & "'onMouseOver =' moveUp (bolo" & i & "," & (table_top+all_height /14) & ", txt" & i & ", rec" & i & ") '; onmouseout =' mudouwn (bolo" & i & "," & (tabela_top+all_height/14) & ", txt" & i & ", rec" & i & "); '>"
Response.Write "<V: FILLOPACIDADE = '60293F'COLOR2 =' FILLIGHTEN (120) 'O: Opacity2 =' 60293f'Rotate = 'T'Ange ='-135'Method = 'LinearSigma'focus =' 100%'Tipo =' gradiente '/>" "
Response.Write "<O: ExtrusionV: ext = 'View'on =' T'backDepth = '25'RoTationAngle =' 60'ViewPoint = '0,0'ViewPointorigin =' 0,0'Skewamt = '0'lightPosition ='-50000, -500'LightPosition2 = '500'/>.
Response.Write "</s: Shape>"
Response.Write "<V: ShapIDD = 'TXT" & i & "' Type = '#3dtxt'style =' Posição: Absolute; esquerda:" & txt_x & "px; top:" & txt_y & "px; z-index: 20; Display: Nenhum: largura: 50;
Response.Write "OnMouseOver = 'Ontxt (Cake" & I & "," & (Table_top+All_Height/14) & ", Txt" & I & ", Rec" & I & ")'>"
Response.Write "<V: FILLOPACIDADE = '60293F'COLOR2 =' FILLIGHTEN (120) 'O: Opacity2 =' 60293f'Rotate = 'T'Ange ='-135'Method = 'LinearSigma'focus =' 100%'Tipo =' gradiente '/>" "
Response.Write "<V: textPathStyle = 'Font-Family:' '';
Response.Write "<o: extrusionV: ext = 'View'backDepth =' 8pt'on = 't'lightPosition =' 0,0'lightPosition2 = '0,0'/>"
Response.Write "</s: Shape>"
Response.Write "</div>"
K1 = K1+K2*2
ifk1> = 360then
K1 = K1-360
endif
IFK1> 180THEN
k4 = k4+1
outro
K4 = K4-1
endif
Response.Write "</a>"
próximo
Função final
%>
<htmlxmlns: v = "urn: schemas-microsoft-com: vml" xmlns: o = "urn: schemas-microsoft-com: office: office">
<head>
<Title> </title>
<Estilo>
v/:*{comportamento: url (#padrão#vml)}
o/:*{Comportamento: url (#padrão#vml)}
</Style>
</head>
<Body>
<ScriptLanguage = "javascript">
<!-
onit = true
num = 0
functionMoveUp (ITEAM, TOP, TXT, REC) {
Temp = Eval (ITEAM)
Tempat = Eval (em cima)
Tentptxt = Eval (TXT)
Temprec = Eval (Rec)
AT = parseint (temp.style.top)
temprec.style.display = "";
if (num> 27) {
temptxt.style.display = "";
}