2019-08-14 09:48:44 +00:00
|
|
|
import { Bar } from 'vue-chartjs';
|
|
|
|
|
2019-08-21 07:29:56 +00:00
|
|
|
const fontFamily =
|
|
|
|
'-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
2019-08-14 09:48:44 +00:00
|
|
|
|
2019-10-28 15:30:02 +00:00
|
|
|
const chartOptions = {
|
|
|
|
responsive: true,
|
|
|
|
maintainAspectRatio: false,
|
|
|
|
legend: {
|
|
|
|
labels: {
|
|
|
|
fontFamily,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
scales: {
|
|
|
|
xAxes: [
|
|
|
|
{
|
|
|
|
barPercentage: 1.9,
|
|
|
|
ticks: {
|
2019-08-14 09:48:44 +00:00
|
|
|
fontFamily,
|
|
|
|
},
|
2019-10-28 15:30:02 +00:00
|
|
|
gridLines: {
|
|
|
|
display: false,
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
2019-10-28 15:30:02 +00:00
|
|
|
],
|
|
|
|
yAxes: [
|
|
|
|
{
|
|
|
|
ticks: {
|
|
|
|
fontFamily,
|
|
|
|
},
|
|
|
|
gridLines: {
|
|
|
|
display: false,
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
2019-10-28 15:30:02 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
extends: Bar,
|
|
|
|
props: ['collection'],
|
|
|
|
mounted() {
|
|
|
|
this.renderChart(this.collection, chartOptions);
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
2019-10-27 04:54:19 +00:00
|
|
|
};
|