We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 252ed6f commit edf4e39Copy full SHA for edf4e39
src/components/DonutChart.vue
@@ -1,6 +1,6 @@
1
<template>
2
<div class="chart">
3
- <Doughnut :data="data" :options="options" :plugins="plugins" />
+ <Doughnut :data="data" :options="options" />
4
</div>
5
</template>
6
@@ -57,24 +57,14 @@ const options = {
57
},
58
59
};
60
-
61
-const plugins = [
62
- {
63
- id: 'legendDistance',
64
- beforeInit(chart: any, args: any, opts: any) {
65
- const originalFit = chart.legend.fit;
66
- chart.legend.fit = function fit() {
67
- originalFit.bind(chart.legend)();
68
- this.width += opts.padding || 0;
69
- };
70
- },
71
72
-];
73
</script>
74
75
<style scoped>
76
.chart {
77
height: 230px;
78
- margin: -10px 0 10px 0;
+ margin: auto;
+ width: 80%;
+ margin-top: -10px;
+ margin-bottom: 10px;
79
}
80
</style>
0 commit comments