Trying to create network graph with Angular 9 and d3.js by following the example in https://medium.com/netscape/visualizing-data-with-angular-and-d3-209dde784aeb
Versions installed are "d3": "^6.2.0", "@types/d3": "^6.1.0"
Getting the below error - Property 'event' does not exist on type
Checked other answers in SO but they are all related to version mismatch and I just got the latest version from d3.
Help please.
d3.event
has been removed in version 6. See also the change log:
D3 now passes events directly to listeners, replacing the d3.event global and bringing D3 inline with vanilla JavaScript and most other frameworks
This answer addresses very well how to access the event
object now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With