chartjs-plugin-labels
chartjs-plugin-labels copied to clipboard
How to add this plugin to Vue project?
Hi! I didn't find any instruction about how to add this plugin to Vue project if I already use chartjs
Hi! I didn't find any instruction about how to add this plugin to Vue project if I already use chartjs
I too want to use this with Vue js but it doesn't seem to be working, may we are not properly configuring it?
Using vue-chartjs it works with the following example:
import { Doughnut } from 'vue-chartjs';
import ChartPluginLabels from 'chartjs-plugin-labels';
export default {
name: 'ChartDoughnut',
extends: Doughnut,
props: {
chartData: {
type: Object,
default: () => {},
},
options: {
type: Object,
default: () => {},
},
plugins: {
type: Array,
default: () => [ChartPluginLabels],
},
},
mounted() {
this.renderChart(this.chartData, this.options);
},
};