Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in angular 7 #35

Open
gcardozoj opened this issue Dec 9, 2019 · 2 comments
Open

Issue in angular 7 #35

gcardozoj opened this issue Dec 9, 2019 · 2 comments

Comments

@gcardozoj
Copy link

Hi, I'm trying to use navio on an Angular app with d3. I show the data in the component but when I try to sort the data (click on a header) I get this error on the console:

core.js:9110 ERROR TypeError: Cannot read property 'sourceEvent' of null at SVGGElement.<anonymous> (navio.min.js:2) at Dispatch.apply (dispatch.js:61) at customEvent (on.js:103) at Emitter.emit (brush.js:286) at Emitter.brush (brush.js:278) at SVGGElement.<anonymous> (brush.js:222) at Selection.each (each.js:5) at brush.move (brush.js:212) at Selection.call (call.js:4) at J (navio.min.js:2)

When I try to select a range, the error is:

core.js:9110 ERROR TypeError: Cannot read property 'touches' of null at SVGGElement.started (brush.js:291) at SVGGElement.<anonymous> (on.js:27) at ZoneDelegate.invokeTask (zone-evergreen.js:391) at Object.onInvokeTask (core.js:34182) at ZoneDelegate.invokeTask (zone-evergreen.js:390) at Zone.runTask (zone-evergreen.js:168) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:465) at invokeTask (zone-evergreen.js:1603) at SVGGElement.globalZoneAwareCallback (zone-evergreen.js:1629)

Any hint about how I can solve those errors. Thanks

@john-guerra
Copy link
Owner

You also get into all sort of issues when embedding in React. I think it is an issue with the way d3 gets bundled with react or angular. The issue is that the d3.event doesn't get binded properly

I have tried many things but nothing seems to work

@john-guerra
Copy link
Owner

There are chances that this can improve with d3@6, because it uses different event handling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants