Click events on Pie Charts in Chart.js

后端 未结 10 2109
失恋的感觉
失恋的感觉 2020-11-28 03:29

I\'ve got a question regard Chart.js.

I\'ve drawn multiple piecharts using the documentation provided. I was wondering if on click of a certain slice of one of the

10条回答
  •  被撕碎了的回忆
    2020-11-28 04:00

    Working fine chartJs sector onclick

    ChartJS : pie Chart - Add options "onclick"

                  options: {
                        legend: {
                            display: false
                        },
                        'onClick' : function (evt, item) {
                            console.log ('legend onClick', evt);
                            console.log('legd item', item);
                        }
                    }
    

提交回复
热议问题