mykola-digtiar / chartjs-plugin-piechart-outlabels

Highly customizable Chart.js plugin that displays labels outside the pie/doughnut chart.
https://piechart-outlabels.netlify.com/sample/
MIT License
52 stars 39 forks source link

Plugin affects all pie and doughnut charts on the page #22

Open diegomagikal opened 3 years ago

diegomagikal commented 3 years ago

Hi,

This plugin works as promised, thanks. The problem is as follows:

I have several pages with a lot of Pie and Doughnut chart components in my SPA, built with Quasar Framework. All components extend vue-chartjs like this:

import { Doughnut } from 'vue-chartjs'
import ChartDataLabels from 'chartjs-plugin-datalabels'

export default {
  extends: Doughnut,
...

When I import your lib inside a single component with

import outlabeledPie from 'chartjs-plugin-piechart-outlabels'

export default {
  extends: Doughnut,

the plugin adds outlabels in all components (Pie and Doughnut).

So, how can I change this behavior? Thanks in advance.