chartjs / chartjs/chartjs-plugin-datalabels
Lazy loading the plugin nested in Vue 3 Script setup
- Dominant language
- JavaScript
- Stars
- 920
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to lazyload this plugin into my Vue3 script setup, like this:
```
const Vue3ChartJs = defineAsyncComponent(() => import('@j-t-mcc/vue3-chartjs'));
const ChartJsPluginDataLabels= defineAsyncComponent(() => import('chartjs-plugin-datalabels'));
```
The problem is that it that the datalabels plugin requires the chartjs to be there.
Can you tell me how to load the label plugin after the load of the chartjs?
I could imagine something nested like:
```
const Vue3ChartJs = defineAsyncComponent(() => import("@j-t-mcc/vue3-chartjs").then(() =>
const ChartJsPluginDataLabels= defineAsyncComponent(() => import('chartjs-plugin-datalabels'));
));
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.