Chart.Funnel.js icon indicating copy to clipboard operation
Chart.Funnel.js copied to clipboard

TypeError: element.getCenterPoint is not a function

Open ryzhak opened this issue 7 years ago • 1 comments

Hi, thank you for this great extension.

I can't run the demo example in my angular 4 application. Getting the following error on chart hover: "ERROR TypeError: element.getCenterPoint is not a function"

The issue arises when I'm NOT using bundled js. So I import the following files: "../node_modules/chart.js/dist/Chart.js", "../node_modules/chartjs-funnel/dist/chart.funnel.js"

screenshot from 2017-07-27 10 49 41

What am I doing wrong?

ryzhak avatar Jul 27 '17 07:07 ryzhak

Dirty hack: add the following code at the bottom of chart.funnel.js file before tooltipPosition function: getCenterPoint: function () { var vm = this._view; return { x: vm.x, y: vm.y }; },

ryzhak avatar Jul 27 '17 08:07 ryzhak