別にIIFEである必要性ないじゃん

This commit is contained in:
shibafu 2019-02-09 23:38:48 +09:00
parent b4a7ec64dd
commit 7a606be3ba

View File

@ -146,40 +146,37 @@
}); });
}); });
(function () { new Chart(document.getElementById('global-count-graph').getContext('2d'), {
var context = document.getElementById('global-count-graph').getContext('2d'); type: 'bar',
var chart = new Chart(context, { data: {
type: 'bar', labels: @json(array_keys($globalEjaculationCounts)),
data: { datasets: [{
labels: @json(array_keys($globalEjaculationCounts)), data: @json(array_values($globalEjaculationCounts)),
datasets: [{ backgroundColor: 'rgba(0, 0, 0, .1)',
data: @json(array_values($globalEjaculationCounts)), borderColor: 'rgba(0, 0, 0, .25)',
backgroundColor: 'rgba(0, 0, 0, .1)', borderWidth: 1
borderColor: 'rgba(0, 0, 0, .25)', }]
borderWidth: 1 },
}] options: {
maintainAspectRatio: false,
legend: {
display: false
}, },
options: { elements: {
maintainAspectRatio: false, line: {}
legend: { },
scales: {
xAxes: [{
display: false display: false
}, }],
elements: { yAxes: [{
line: {} display: false,
}, ticks: {
scales: { beginAtZero: true
xAxes: [{ }
display: false }]
}],
yAxes: [{
display: false,
ticks: {
beginAtZero: true
}
}]
}
} }
}); }
}()); });
</script> </script>
@endpush @endpush