Commit 2dd0a17fe3f36d5b6d56e54842e42cf7cc7c2bdc
1 parent
80bee82e
Exists in
master
and in
7 other branches
inclusão de gráfico de distribuição de pontos
Showing
3 changed files
with
65 additions
and
8 deletions
Show diff stats
classesphp/funcoes_gerais.php
@@ -1192,10 +1192,10 @@ function agrupaValores($lista,$indiceChave,$indiceValor,$tipo) | @@ -1192,10 +1192,10 @@ function agrupaValores($lista,$indiceChave,$indiceValor,$tipo) | ||
1192 | } | 1192 | } |
1193 | if ($tipo == "nenhum") | 1193 | if ($tipo == "nenhum") |
1194 | { | 1194 | { |
1195 | - if (($v != "") && (is_numeric($v))) | ||
1196 | - { | 1195 | + //if (($v != "") && (is_numeric($v))) |
1196 | + //{ | ||
1197 | $valoresn[] = $v; | 1197 | $valoresn[] = $v; |
1198 | - } | 1198 | + //} |
1199 | $valores = $valoresn; | 1199 | $valores = $valoresn; |
1200 | } | 1200 | } |
1201 | } | 1201 | } |
ferramentas/graficointerativo/index.js.php
@@ -137,6 +137,8 @@ i3GEOF.graficointerativo = { | @@ -137,6 +137,8 @@ i3GEOF.graficointerativo = { | ||
137 | ' <tr><td> </td></tr>' + | 137 | ' <tr><td> </td></tr>' + |
138 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="area" name="tipoGrafico" style=cursor:pointer > </td><td>área 2d</td></tr>' + | 138 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="area" name="tipoGrafico" style=cursor:pointer > </td><td>área 2d</td></tr>' + |
139 | ' <tr><td> </td></tr>' + | 139 | ' <tr><td> </td></tr>' + |
140 | + ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="scatter" name="tipoGrafico" style=cursor:pointer > </td><td>distribuição de pontos</td></tr>' + | ||
141 | + ' <tr><td> </td></tr>' + | ||
140 | 142 | ||
141 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_filled" name="tipoGrafico" style=cursor:pointer > </td><td>barras simples</td></tr>' + | 143 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_filled" name="tipoGrafico" style=cursor:pointer > </td><td>barras simples</td></tr>' + |
142 | ' <tr><td> </td></tr>' + | 144 | ' <tr><td> </td></tr>' + |
@@ -153,6 +155,9 @@ i3GEOF.graficointerativo = { | @@ -153,6 +155,9 @@ i3GEOF.graficointerativo = { | ||
153 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_round_glass" name="tipoGrafico" style=cursor:pointer > </td><td>barras cúpula</td></tr>' + | 155 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_round_glass" name="tipoGrafico" style=cursor:pointer > </td><td>barras cúpula</td></tr>' + |
154 | ' <tr><td> </td></tr>' + | 156 | ' <tr><td> </td></tr>' + |
155 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_round" name="tipoGrafico" style=cursor:pointer > </td><td>barras pílula</td></tr>' + | 157 | ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_round" name="tipoGrafico" style=cursor:pointer > </td><td>barras pílula</td></tr>' + |
158 | + ' <tr><td> </td></tr>' + | ||
159 | + ' <tr><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="hbar" name="tipoGrafico" style=cursor:pointer > </td><td>barras horizontais</td></tr>' + | ||
160 | + | ||
156 | ' </table>' + | 161 | ' </table>' + |
157 | '</div> ' + | 162 | '</div> ' + |
158 | '<div class=guiaobj id="i3GEOgraficointerativoguia2obj" style="left:1px;display:none;top:-5px">' + | 163 | '<div class=guiaobj id="i3GEOgraficointerativoguia2obj" style="left:1px;display:none;top:-5px">' + |
@@ -177,6 +182,7 @@ i3GEOF.graficointerativo = { | @@ -177,6 +182,7 @@ i3GEOF.graficointerativo = { | ||
177 | '<div class=guiaobj id="i3GEOgraficointerativoguia3obj" style="left:1px;display:none;top:-5px">' + | 182 | '<div class=guiaobj id="i3GEOgraficointerativoguia3obj" style="left:1px;display:none;top:-5px">' + |
178 | ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoAcumula /> Utiliza valores acumulados</p>' + | 183 | ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoAcumula /> Utiliza valores acumulados</p>' + |
179 | ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoRelativa /> Utiliza valores relativos (%)</p>' + | 184 | ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoRelativa /> Utiliza valores relativos (%)</p>' + |
185 | + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoDadosPuros /> Não processa os valores ao obter os dados (mantém os dados como estão na tabela de atributos) - essa opção é útil nos gráficos de distribuição de pontos</p>' + | ||
180 | '</div>'+ | 186 | '</div>'+ |
181 | '<div class=guiaobj id="i3GEOgraficointerativoguia4obj" style="left:1px;display:none;top:-5px">' + | 187 | '<div class=guiaobj id="i3GEOgraficointerativoguia4obj" style="left:1px;display:none;top:-5px">' + |
182 | ' <div id="i3GEOgraficointerativoGrafico"></div>' + | 188 | ' <div id="i3GEOgraficointerativoGrafico"></div>' + |
@@ -307,10 +313,14 @@ i3GEOF.graficointerativo = { | @@ -307,10 +313,14 @@ i3GEOF.graficointerativo = { | ||
307 | x = $i("i3GEOgraficointerativoComboXid").value, | 313 | x = $i("i3GEOgraficointerativoComboXid").value, |
308 | y = $i("i3GEOgraficointerativoComboYid").value, | 314 | y = $i("i3GEOgraficointerativoComboYid").value, |
309 | excluir = $i("i3GEOgraficointerativoexcluir").value, | 315 | excluir = $i("i3GEOgraficointerativoexcluir").value, |
310 | - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=graficoSelecao&tema="+tema+"&itemclasses="+x+"&itemvalores="+y+"&excluir="+excluir, | 316 | + p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=graficoSelecao&tema="+tema+"&itemclasses="+x+"&itemvalores="+y+"&exclui="+excluir, |
311 | cp = new cpaint(), | 317 | cp = new cpaint(), |
312 | tipo = "soma", | 318 | tipo = "soma", |
313 | monta; | 319 | monta; |
320 | + | ||
321 | + if($i("i3GEOgraficointerativoDadosPuros").checked) | ||
322 | + {tipo = "nenhum";} | ||
323 | + | ||
314 | if(x === y) | 324 | if(x === y) |
315 | {tipo = "conta";} | 325 | {tipo = "conta";} |
316 | if(tema === "") | 326 | if(tema === "") |
@@ -401,6 +411,8 @@ i3GEOF.graficointerativo = { | @@ -401,6 +411,8 @@ i3GEOF.graficointerativo = { | ||
401 | soma = 0, | 411 | soma = 0, |
402 | menor = inputs[1].value * 1, | 412 | menor = inputs[1].value * 1, |
403 | maior = 0, | 413 | maior = 0, |
414 | + menorNome = inputs[0].value * 1, | ||
415 | + maiorNome = 0, | ||
404 | alpha = 0.8, | 416 | alpha = 0.8, |
405 | stroke = 2, | 417 | stroke = 2, |
406 | gradient = true, | 418 | gradient = true, |
@@ -414,7 +426,8 @@ i3GEOF.graficointerativo = { | @@ -414,7 +426,8 @@ i3GEOF.graficointerativo = { | ||
414 | rotacaoX = 270, | 426 | rotacaoX = 270, |
415 | legendaX = "", | 427 | legendaX = "", |
416 | legendaY = "", | 428 | legendaY = "", |
417 | - fill = "#C4B86A"; | 429 | + fill = "#C4B86A", |
430 | + pointSize = 2; | ||
418 | if($i("i3GEOgraficointerativoComboXid")) | 431 | if($i("i3GEOgraficointerativoComboXid")) |
419 | {legendaX = $i("i3GEOgraficointerativoComboXid").value;} | 432 | {legendaX = $i("i3GEOgraficointerativoComboXid").value;} |
420 | if($i("i3GEOgraficointerativoComboYid")) | 433 | if($i("i3GEOgraficointerativoComboYid")) |
@@ -431,6 +444,11 @@ i3GEOF.graficointerativo = { | @@ -431,6 +444,11 @@ i3GEOF.graficointerativo = { | ||
431 | {maior = temp;} | 444 | {maior = temp;} |
432 | if(temp < menor) | 445 | if(temp < menor) |
433 | {menor = temp;} | 446 | {menor = temp;} |
447 | + temp = inputs[i].value * 1; | ||
448 | + if(temp > maiorNome) | ||
449 | + {maiorNome = temp;} | ||
450 | + if(temp < menorNome) | ||
451 | + {menorNome = temp;} | ||
434 | par.push({"value":inputs[i+1].value * 1,"label":inputs[i].value+" "}); | 452 | par.push({"value":inputs[i+1].value * 1,"label":inputs[i].value+" "}); |
435 | } | 453 | } |
436 | if($i("i3GEOgraficointerativoAcumula").checked){ | 454 | if($i("i3GEOgraficointerativoAcumula").checked){ |
@@ -469,7 +487,7 @@ i3GEOF.graficointerativo = { | @@ -469,7 +487,7 @@ i3GEOF.graficointerativo = { | ||
469 | "x_axis": null | 487 | "x_axis": null |
470 | }; | 488 | }; |
471 | } | 489 | } |
472 | - if(i3GEOF.graficointerativo.tipo === "area" || i3GEOF.graficointerativo.tipo === "bar_round" || i3GEOF.graficointerativo.tipo === "bar_round_glass" || i3GEOF.graficointerativo.tipo === "bar_filled" || i3GEOF.graficointerativo.tipo === "bar_glass" || i3GEOF.graficointerativo.tipo === "bar_3d" || i3GEOF.graficointerativo.tipo === "bar_sketch" || i3GEOF.graficointerativo.tipo === "bar_cylinder" || i3GEOF.graficointerativo.tipo === "bar_cylinder_outline"){ | 490 | + if(i3GEOF.graficointerativo.tipo === "scatter" || i3GEOF.graficointerativo.tipo === "hbar" || i3GEOF.graficointerativo.tipo === "area" || i3GEOF.graficointerativo.tipo === "bar_round" || i3GEOF.graficointerativo.tipo === "bar_round_glass" || i3GEOF.graficointerativo.tipo === "bar_filled" || i3GEOF.graficointerativo.tipo === "bar_glass" || i3GEOF.graficointerativo.tipo === "bar_3d" || i3GEOF.graficointerativo.tipo === "bar_sketch" || i3GEOF.graficointerativo.tipo === "bar_cylinder" || i3GEOF.graficointerativo.tipo === "bar_cylinder_outline"){ |
473 | parametros = { | 491 | parametros = { |
474 | "elements":[{ | 492 | "elements":[{ |
475 | "type": i3GEOF.graficointerativo.tipo, | 493 | "type": i3GEOF.graficointerativo.tipo, |
@@ -484,7 +502,7 @@ i3GEOF.graficointerativo = { | @@ -484,7 +502,7 @@ i3GEOF.graficointerativo = { | ||
484 | "gradient-fill": gradient, | 502 | "gradient-fill": gradient, |
485 | "fill": fill, | 503 | "fill": fill, |
486 | "fill-alpha": alpha, | 504 | "fill-alpha": alpha, |
487 | - "dot-style": { "type": "dot", "colour": "#9C0E57", "dot-size": 7 } | 505 | + "dot-style": { "type": "anchor", "colour": "#9C0E57", "dot-size": pointSize } |
488 | }], | 506 | }], |
489 | "x_axis": { | 507 | "x_axis": { |
490 | "colour": "#A2ACBA", | 508 | "colour": "#A2ACBA", |
@@ -516,6 +534,45 @@ i3GEOF.graficointerativo = { | @@ -516,6 +534,45 @@ i3GEOF.graficointerativo = { | ||
516 | "style": "{font-size: "+tituloSize+"; color:"+tituloCor+"; text-align: "+tituloAlinhamento+";}" | 534 | "style": "{font-size: "+tituloSize+"; color:"+tituloCor+"; text-align: "+tituloAlinhamento+";}" |
517 | } | 535 | } |
518 | }; | 536 | }; |
537 | + if(i3GEOF.graficointerativo.tipo === "hbar"){ | ||
538 | + n = valores.length; | ||
539 | + temp = []; | ||
540 | + for(i=0;i<n;i++){ | ||
541 | + temp.push({"left":0,right:valores[i]}); | ||
542 | + } | ||
543 | + parametros.elements[0].values = temp; | ||
544 | + | ||
545 | + parametros.x_axis = { | ||
546 | + "min": 0, | ||
547 | + "max": maior, | ||
548 | + "steps": parseInt((maior / divisoesY),10) | ||
549 | + } | ||
550 | + parametros.y_axis = { | ||
551 | + "offset": 1, | ||
552 | + "labels": nomes | ||
553 | + }; | ||
554 | + parametros.x_legend.text = legendaY; | ||
555 | + parametros.y_legend.text = legendaX; | ||
556 | + } | ||
557 | + if(i3GEOF.graficointerativo.tipo === "scatter"){ | ||
558 | + n = valores.length; | ||
559 | + temp = []; | ||
560 | + for(i=0;i<n;i++){ | ||
561 | + temp.push({"x":nomes[i],"y":valores[i]}); | ||
562 | + } | ||
563 | + parametros.elements[0].values = temp; | ||
564 | + parametros.x_axis = { | ||
565 | + "min": menor, | ||
566 | + "max": maior, | ||
567 | + "steps": parseInt(((maior - menor) / divisoesY),10) | ||
568 | + } | ||
569 | + parametros.x_axis = { | ||
570 | + "min": menorNome, | ||
571 | + "max": maiorNome, | ||
572 | + "steps": parseInt(((maiorNome - menorNome) / divisoesY),10) | ||
573 | + } | ||
574 | + parametros.elements[0].tip = "#x# - #y#"; | ||
575 | + } | ||
519 | } | 576 | } |
520 | return JSON1.stringify(parametros); | 577 | return JSON1.stringify(parametros); |
521 | }catch(erro){alert(erro);} | 578 | }catch(erro){alert(erro);} |
ms_configura.php
@@ -50,7 +50,7 @@ Free Software Foundation, Inc., no endereço | @@ -50,7 +50,7 @@ Free Software Foundation, Inc., no endereço | ||
50 | Tipo: | 50 | Tipo: |
51 | {string} | 51 | {string} |
52 | */ | 52 | */ |
53 | -$mensagemInicia = 'Versão 4.3 - beta. Revisão SVN 1427'; | 53 | +$mensagemInicia = 'Versão 4.3 - beta. Revisão SVN 1446'; |
54 | /* | 54 | /* |
55 | Variable: tituloInstituicao | 55 | Variable: tituloInstituicao |
56 | 56 |