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

@ -10,6 +10,65 @@
<canvas id="canvas" height="360" width="890"></canvas>
</div>
<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: {
@ -78,7 +137,7 @@
window.onload = function(){
var ctx = document.getElementById("canvas").getContext("2d");
window.myLine = new Chart(ctx, lineChartData);
window.myLine = new Chart(ctx, barChartData);
}
</script>