Skip to content

Commit edf4e39

Browse files
committed
Fix chart style
1 parent 252ed6f commit edf4e39

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/components/DonutChart.vue

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="chart">
3-
<Doughnut :data="data" :options="options" :plugins="plugins" />
3+
<Doughnut :data="data" :options="options" />
44
</div>
55
</template>
66

@@ -57,24 +57,14 @@ const options = {
5757
},
5858
},
5959
};
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-
];
7360
</script>
7461

7562
<style scoped>
7663
.chart {
7764
height: 230px;
78-
margin: -10px 0 10px 0;
65+
margin: auto;
66+
width: 80%;
67+
margin-top: -10px;
68+
margin-bottom: 10px;
7969
}
8070
</style>

0 commit comments

Comments
 (0)