apertureless / vue-chartjs

📊 Vue.js wrapper for Chart.js
https://vue-chartjs.org
MIT License
5.54k stars 837 forks source link

Need help to embed plugins funnel #689

Closed sluxzer closed 2 years ago

sluxzer commented 3 years ago

Hi there,

i'm trying to add this plugin Chart Funnel on vue chartjs, but i just dont know how to register the type.

to be honest, i don't know if this plugins compatible with vue-chartjs or using self register, i'm new on vue

what i already do `

<script>
import { generateChart } from 'vue-chartjs'
// First argument is the chart-id, second the chart type.
const Funneling = generateChart('funnel', 'funnel')

export default {
    extends: Funneling,
    props: {
        chartdata: {
            type: Object,
            default: null
        },
        options: {
            type: Object,
            default: null,
        },
    },
    mounted () {
        this.renderChart(this.chartdata, this.options)
    }
}
</script>

` the code show me blank canvas

Can anyone help me through this. Thank you

apertureless commented 2 years ago

Sorry, can't really help with any third party plugins. I do not know how the funnel plugin should be registered in first place. In their readme, they just install it over npm and then in the config they set the type to funnel.

So I am not sure maybe you need to import it first and then use the generateChart helper, maybe it should be registered as a plugin then, you can use either the prop or the method: