Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17897

Error: Custom Visual

$
0
0

Hello!

When coding a custom barchart for powerbi I get an error with a d3 typing. I had errors with other d3 typings when following the microsoft instructional video on youtube, but I have figured out that those errors were due to the d3 update to v4 and I was able to fix those errors. However I am running into one error with the d3-selection typings and I am unable to find a solutionpowerbierror.PNG

 

 I cannot find anyone who has the same error and to my best knowledge the update to d3 isn't what is causing it. The error message I am getting it: 'Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).' If I add the other 3 arguments that are required I get other errors in my code and from all the searching that I have done it doesn't look like anyone else has any other arguments.

 

code that I have:

private svg: d3.Selection<SVGElement>;

with additional arguments:

private svg: d3.Selection<SVGElement, any, any, any>;

or:

private svg: d3.Selection<SVGElement, null, null, null>;

Does anyone know if there is any fix to this error? I am new to typescript and javascript and whereas I am starting to understand the logic, I can't seem to find anyone with the same error or a solution to the error anywhere. I could add the 3 extra arguments and go through and try and fix the errors that will appear due to that, but it doesnt seem that anyone else who is creating these custom visuals has any additional arguments.

Thanks in advance!

 


Viewing all articles
Browse latest Browse all 17897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>