n3-charts / line-chart

Awesome charts for AngularJS.
http://n3-charts.github.io/line-chart/
MIT License
1.2k stars 180 forks source link

this._dispatch[event] is undefined on mouse-move, chart not rendered #513

Closed ppnauman closed 7 years ago

ppnauman commented 7 years ago

Hi!

I'm trying to draw a bar chart for the very first time. I followed the examples on n3-charts web page using the same 'data' and 'options' objects. However, the chart doesn't render. Instead, I find the following error message in the (Chrome) console:

LineChart.js:718 Uncaught TypeError: Cannot read property 'apply' of undefined EventManager.trigger @ LineChart.js:718 (anonymous function) @ LineChart.js:696 (anonymous function) @ d3.v4.min.js:3

This message appears every time I move the mouse on the page (anywhere on page, it seems) and the above mouse-move event executes. Same thing in Firefox (TypeError: this._dispatch[event] is undefined).

I've installed d3 and n3-charts using npm and also from the cloud (CDN), but the same error appears.

The linechart element is located inside a bootstrap grid and wrapped inside a div element. I have tried setting height for the div and linechart but it doesn't help. I also tried putting the chart outside the grid, but it doesn't help.

Any suggestions what I'm doing wrong?

chaosmail commented 7 years ago

Could you please try with D3 version 3 instead and see if the same problem occurs?

ppnauman commented 7 years ago

Thank you @chaosmail ! Using D3 version 3.5.17, it works fine.