title: PowerBI Custom Visual - d3.Selection error
body: <p>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 solution. </p>
  
  <p><img src="https://i.stack.imgur.com/cWmEy.png" alt="Picture of Error in Visual Studio Code.">  </p>
  
  <p>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: </p>
  
  <blockquote>
    <p>'Generic type 'Selection' requires
    4 type argument(s).'</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>code that I have:</p>
  
  <pre><code>private svg: d3.Selection&lt;SVGElement&gt;;
  </code></pre>
  
  <p>with additional arguments (creates other errors):</p>
  
  <pre><code>private svg: d3.Selection&lt;SVGElement, any, any, any&gt;;
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>private svg: d3.Selection&lt;SVGElement, null, null, null&gt;;
  </code></pre>
  
  <p>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 <a href="https://i.stack.imgur.com/1Rrt7.png" rel="nofollow noreferrer">error</a> that will appear due to that, but it doesnt seem that anyone else who is creating these custom visuals has any additional arguments.</p>