chartjs/chartjs-plugin-datalabels

How to configure in VUE3

xiaoForest opened this issue · 2 comments

Hi
How to configure VUe3 Setup after import

`
import Vue3ChartJs from "@j-t-mcc/vue3-chartjs";
import ChartJsPluginDataLabels from "chartjs-plugin-datalabels";
export default {
components: { Vue3ChartJs, ChartJsPluginDataLabels },
setup(props, content) {
?????

}
}

`

First you need to register it, after that just pass the options as normal

Edit
Reading docs of your wrapper also helps, it is exlplained in there.

@LeeLenaleee Thank you very much, thank you for your pointers.

import Vue3ChartJs from "@j-t-mcc/vue3-chartjs";
import ChartJsPluginDataLabels from "chartjs-plugin-datalabels";
Vue3ChartJs.registerGlobalPlugins([ChartJsPluginDataLabels])