Merge pull request #19 from aiosin/master

change dashboard line chart to bar chart
This commit is contained in:
Hugo Teso 2017-03-30 17:00:54 +02:00 committed by GitHub
commit 4732953e43

View File

@ -1,15 +1,74 @@
<!doctype html>
<html>
<head>
<title>Statistics</title>
<head>
<title>Statistics</title>
<script src="qrc:/html/Chart.js"></script>
<script src="qrc:/html/utils.js"></script>
</head>
<body>
</head>
<body>
<div style="width:100%; height:100%;">
<canvas id="canvas" height="360" width="890"></canvas>
</div>
<script>
<script>
var barChartData = {
type:'bar',
data:{
labels : ["Functions","Imports","Symbols","Strings","Relocs", "Sections"],
datasets:[
{
fill: false,
lineTension: 0.1,
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0.0,
borderJoinStyle: 'miter',
pointBorderWidth: 1,
pointHoverRadius: 5,
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 10,
spanGaps: false,
label: "Found",
backgroundColor: window.chartColors.blue,
borderColor: window.chartColors.blue,
data : [MEOW]
}
]
},
options: {
responsive: true,
legend:{
display: false,
},
title:{
display: false,
text:'bar chart '
},
tooltips:{
mode:'index',
intersect: false,
displayColors: false,
},
hover:{
mode:'nearest',
intersect: false,
},
animation:{
duration: 0
},
scales:{
xAxes: [{
display: true,
scaleLabel:{
display: true,
labelString: 'Flags'
}
}]
}
}
};
var lineChartData = {
type: 'line',
data: {
@ -36,51 +95,51 @@
]
},
options: {
responsive: true,
legend: {
display: false,
},
title:{
display: false,
text:'Binary statistics'
},
tooltips: {
mode: 'index',
intersect: false,
displayColors: false,
},
hover: {
mode: 'nearest',
intersect: true
},
animation: {
duration: 0
},
scales: {
xAxes: [{
display: true,
scaleLabel: {
responsive: true,
legend: {
display: false,
},
title:{
display: false,
text:'Binary statistics'
},
tooltips: {
mode: 'index',
intersect: false,
displayColors: false,
},
hover: {
mode: 'nearest',
intersect: true
},
animation: {
duration: 0
},
scales: {
xAxes: [{
display: true,
labelString: 'Flags'
}
}],
yAxes: [{
display: true,
scaleLabel: {
scaleLabel: {
display: true,
labelString: 'Flags'
}
}],
yAxes: [{
display: true,
labelString: 'Value'
}
}]
}
scaleLabel: {
display: true,
labelString: 'Value'
}
}]
}
}
};
window.onload = function(){
var ctx = document.getElementById("canvas").getContext("2d");
window.myLine = new Chart(ctx, lineChartData);
}
window.onload = function(){
var ctx = document.getElementById("canvas").getContext("2d");
window.myLine = new Chart(ctx, barChartData);
}
</script>
</body>
</script>
</body>
</html>