Add problem point distribution
This commit is contained in:
parent
8ac611f9f4
commit
04a20626b8
4 changed files with 87 additions and 2 deletions
|
@ -65,4 +65,26 @@
|
|||
},
|
||||
});
|
||||
}
|
||||
function draw_histogram(data, $chart) {
|
||||
var ctx = $chart.find('canvas')[0].getContext('2d');
|
||||
ctx.canvas.height = 20 * data.labels.length + 100;
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: data,
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
tooltips: {
|
||||
callbacks: {
|
||||
label: function(tooltipItem, data) {
|
||||
return tooltipItem.value;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue