Add problem point distribution

This commit is contained in:
cuom1999 2021-06-01 19:20:39 -05:00
parent 8ac611f9f4
commit 04a20626b8
4 changed files with 87 additions and 2 deletions

View file

@ -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>