victorgarciaesgi / vue-chart-3

📊 A simple wrapper around Chart.js 3 for Vue 2 & 3
https://vue-chart-3.netlify.app/
MIT License
310 stars 112 forks source link

Click event handler? #125

Open telisjok opened 2 years ago

telisjok commented 2 years ago

Related to this question, is there or will a click event handler be implemented?

goper-leo commented 2 years ago

I'm using the options props

const options = ref({
    responsive: true,
    onClick: barClicked
})

function barClicked(event, item) {
    console.log('graph bar is clicked', event, item)
}

<BarChart :chart-data="data" :options="options" />

Chart.js