Forum Discussion
Typescript Error: .attr("d", d3.geoPath())
- 5 years ago
Thanks for the reply Lionel, although I'm not sure where is the solution is in the video link you posted though.
In any case, for anyone else having the same problem, I have found the reason why the error appears.
The issue in my case is because the wrong version of @types/d3-selection was pulled in.
In the default version of the package.json that is created by pbiviz for new projects, the dependency for @types/d3 is 5.7.2 and the link for d3-selection is a @types/d3-selection@* instead of ^1 which pulls in the latest version that is supposed to be used in d3v6 instead of d3v5.
This issue causes other problems as well as the d3.event is unavailable (in v6 the event object is passed into the listener).
How to fix this is described here:
Just change the liner in the package.json for @types/d3 to the latest v5 and the error will magically disappear. i.e. they fixed the link in the latest version.
Hi jerometay ,
Try to use this way.
GeoJson to Power BI Shape Maps. - YouTube
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jerometay5 years agoFrequent Visitor
Thanks for the reply Lionel, although I'm not sure where is the solution is in the video link you posted though.
In any case, for anyone else having the same problem, I have found the reason why the error appears.
The issue in my case is because the wrong version of @types/d3-selection was pulled in.
In the default version of the package.json that is created by pbiviz for new projects, the dependency for @types/d3 is 5.7.2 and the link for d3-selection is a @types/d3-selection@* instead of ^1 which pulls in the latest version that is supposed to be used in d3v6 instead of d3v5.
This issue causes other problems as well as the d3.event is unavailable (in v6 the event object is passed into the listener).
How to fix this is described here:
Just change the liner in the package.json for @types/d3 to the latest v5 and the error will magically disappear. i.e. they fixed the link in the latest version.