title: d3js - d3.scale.category10() not working?
body: <p>I add <code>d3js</code> to my new project:</p>
  
  
  
  <p>and do a simple test just to make sure it works:</p>
  
  <pre><code>d3.select(".d3div").transition()
      .duration(750)
      .style("background-color", "black");
  </code></pre>
  
  <p>this work. However:</p>
  
  <pre><code>var colors = d3.scale.category10().domain([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
  </code></pre>
  
  <p>this give error:</p>
  
  <blockquote>
    <p>myd3.js:1 Uncaught TypeError: Cannot read property 'category10' of
    undefined</p>
  </blockquote>
  
  <p>and I try some other function too:</p>
  
  <pre><code>d3.scale.linear()
  </code></pre>
  
  <p>have some errors:</p>
  
  <blockquote>
    <p>myd3.js:3 Uncaught TypeError: Cannot read property 'linear' of
    undefined</p>
  </blockquote>
  
  <p>if I change the import to </p>
  
  <pre><code>&lt;script src="https://d3js.org/d3.v3.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>then it works for the functions, but the <code>transition</code> animation not working anymore.</p>
  
  <p>I want to use the latest version. but it seems like there are scope changes that I am not aware of. </p>
  
  <p>How can I resolve this?</p>