Commit ac921e48 authored by bhm15's avatar bhm15

responsividade dos gráficos + titulo nos eixos

parent 75d3f760
......@@ -244,11 +244,45 @@ function plotaGraficoX(/*vetX,vetY */indice,idHTML, grafico){
};
}
var layout = {
title: idHTML,
xaxis: {
title:"Pergunta",
tickfont: {
size: 14,
color: 'rgb(107, 107, 107)'
}},
yaxis: {
title: 'Tempo',
titlefont: {
size: 16,
color: 'rgb(107, 107, 107)'
},
tickfont: {
size: 14,
color: 'rgb(107, 107, 107)'
}
},
legend: {
x: 0,
y: 1.0,
bgcolor: 'rgba(255, 255, 255, 0)',
bordercolor: 'rgba(255, 255, 255, 0)'
},
barmode: 'group',
bargap: 0.15,
bargroupgap: 0.1,
showlegend: false
};
var node = document.createElement("CENTER");
node.id = idHTML;
//document.getElementById("logado_main").innerHTML += "<center>"+idHTML+"</center>";
document.getElementById("logado_main").appendChild(node);//idHTML+"<br><center id='"+idHTML+"'></center>"
Plotly.newPlot(idHTML, vetLinhas,{title:idHTML,showlegend: false});
Plotly.newPlot(idHTML, vetLinhas,layout);
vetLinhas = [];
auxVetY = [];
auxVetX = [];
......@@ -304,27 +338,53 @@ function plotaGraficoMedia(graficoGlobal, indice,idHTML, grafico){
name: "media"
};
var layout = {
title: idHTML,
xaxis: {
title:"Pergunta",
tickfont: {
size: 14,
color: 'rgb(107, 107, 107)'
}},
yaxis: {
title: 'Tempo',
titlefont: {
size: 16,
color: 'rgb(107, 107, 107)'
},
tickfont: {
size: 14,
color: 'rgb(107, 107, 107)'
}
},
legend: {
x: 0,
y: 1.0,
bgcolor: 'rgba(255, 255, 255, 0)',
bordercolor: 'rgba(255, 255, 255, 0)'
},
barmode: 'group',
bargap: 0.15,
bargroupgap: 0.1,
showlegend: false,
annotations: [ {
xref: 'paper',
yref: 'paper',
x: 1,
xanchor: 'bottom',
y: 1.1,
yanchor: 'right',
text: 'Quantidade total: '+quantidadePergunatasAbsolutas+' Quantidade acertos: '+acertosAbsolutos,
showarrow: false
}]
};
var node = document.createElement("CENTER");
node.id = idHTML;
node.class = "divGrafico";
document.getElementById("logado_main").appendChild(node);
Plotly.newPlot(idHTML, vetLinhas, {
title: idHTML,
annotations: [ {
xref: 'paper',
yref: 'paper',
x: 1,
xanchor: 'bottom',
y: 1.1,
yanchor: 'right',
text: 'Quantidade total: '+quantidadePergunatasAbsolutas+' Quantidade acertos: '+acertosAbsolutos,
showarrow: false
}]
} );
Plotly.newPlot(idHTML, vetLinhas, layout);
vetLinhas = [];
}
......
......@@ -26,6 +26,11 @@
.exclueTeste{
color:red;
}
.js-plotly-plot{
position:relative;
width:90% !important;
left:5% !important;
}
</style>
</head>
<body>
......
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