Commit 34208761 authored by mc16's avatar mc16

bonitinhus

parent f756501b
This diff is collapsed.
......@@ -15,7 +15,7 @@
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
background:#0078e7;
background:#53868B;
height:100%;
overflow:hidden;
width:370px;
......@@ -138,7 +138,7 @@ b{
position:absolute;
top:0;
left:0;
background-color:lightblue;
background-color:#A2B5CD;
width:100%;
height:100%;
}
......@@ -162,7 +162,7 @@ b{
position:absolute;
top:0;
left:0;
background-color:lightblue;
background-color:#A2B5CD;
width:100%;
height:100%;
}
......@@ -201,7 +201,7 @@ b{
outline-color: rgba(0,0,0,0.5);
}
#horizontal{
background: #0078e7;
background: #53868B;
}
......@@ -241,9 +241,9 @@ b{
}
#externa{
position:absolute;
top:0;
top:100px;
left:0;
background-color:lightblue;
background-color:white;
width:100%;
height:100%;
}
var dataSet = [];
var localStoreLigado = false;
if (typeof(Storage) !== "undefined") {
......@@ -218,8 +219,6 @@ function plotaGraficoX(/*vetX,vetY */indice,idHTML, grafico){
var j;
for(var i = 0; i < dados.length; i++){
console.log(dados[i]);
console.log(buscaTempoResposta(dados[i].stringResposta[indice]));
//Linhas
var tempos = buscaTempoResposta(dados[i].stringResposta[indice]);
vetLinhas[vetLinhas.length] = {
......@@ -272,16 +271,12 @@ function plotaGraficoMediaX(/*vetX,vetY */indice,idHTML, grafico){
for(var j=0; j< tempos.length; j++)
{
media[j] = parseFloat(media[j]) + parseFloat(tempos[j]);
console.log("dentro do for");
console.log(media[j]);
}
}
for(var i=0; i< media.length; i++)
{
media[i] = parseFloat(media[i])/parseFloat(dados.length);
}
console.log("Media " + media.length)
console.log(media);
vetLinhas[vetLinhas.length] = {
x: range(media.length),
y: media,
......@@ -299,25 +294,29 @@ function plotaGraficoMediaX(/*vetX,vetY */indice,idHTML, grafico){
//Percorre os testes do professor e os plota de acordo com a congruencia
function geraGraficos(){
document.getElementById("graficoC").innerHTML = "";
document.getElementById("graficoI").innerHTML = "";
document.getElementById("graficoCMedia").innerHTML= "";
document.getElementById("graficoIMedia").innerHTML= "";
if(dados){
document.getElementById("graficoC").innerHTML = "";
document.getElementById("graficoI").innerHTML = "";
document.getElementById("graficoCMedia").innerHTML = "";
document.getElementById("graficoIMedia").innerHTML = "";
if(!dados.length)
{
alert("Não há nenhum teste registrado!");
return;
}
var congruentes = 0;
var incongruentes = 0;
for( var i = 0; i< dados[0].ordemBateria.length; i++){
if(dados[0].ordemBateria[i] == "C"){
document.getElementById("graficoC").innerHTML += "Gráfico Congruente " + (congruentes+1);
plotaGraficoX(congruentes+incongruentes,"Congruente "+(congruentes+1), "graficoC");
congruentes++;
}
if(dados[0].ordemBateria[i] == "I"){
document.getElementById("graficoI").innerHTML += "Gráfico Incongruente "+(incongruentes+1);
plotaGraficoX(congruentes+incongruentes,"Incongruente "+(incongruentes+1), "graficoI");
incongruentes++;
}
......@@ -327,11 +326,13 @@ function geraGraficos(){
incongruentes=0;
for( var i = 0; i< dados[0].ordemBateria.length; i++){
if(dados[0].ordemBateria[i] == "C"){
document.getElementById("graficoCMedia").innerHTML += "Gráfico Média Congruente " + (congruentes+1);
plotaGraficoMediaX(congruentes+incongruentes,"CongruenteMedia "+(congruentes+1), "graficoCMedia");
congruentes++;
}
if(dados[0].ordemBateria[i] == "I"){
document.getElementById("graficoIMedia").innerHTML+= "Gráfico Média Incongruente " + (incongruentes+1);
plotaGraficoMediaX(congruentes+incongruentes,"IncongruenteMedia "+(incongruentes+1), "graficoIMedia");
incongruentes++;
}
......@@ -375,7 +376,8 @@ function gerenciarTestes(){
//Chamado ao clicar no botao do inicio
function inicioTestes(){
paginaAtual = "main";
loadPage();
buscaTestes();
}
function downloadCsv(){
......@@ -423,7 +425,6 @@ function downloadCsv(){
}
if(ordemFiltrada[j]=="I"){
lineIndex = parseInt(j*dataSet[i].stringResposta[j].length)+j;
console.log(j);
lines[lineIndex]+="Incongruente,";
}
for(var k in dataSet[i].stringResposta[j]){
......
......@@ -47,7 +47,7 @@
</div> <!-- /#menu -->
</div> <!-- /#lateral -->
</div>
<div id= "externa">
<div id= "externa" >
<center id='graficoC'></center>
<center id='graficoI'></center>
<center id='graficoCMedia'></center>
......@@ -142,4 +142,5 @@
<script src="js/professor.js"></script>
<script src="js/save_data.js"></script>
<script src="js/configuracoes.js"></script>
<script> buscaTestes(); </script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment