I will add d3jsto my new project:
and do a simple test to make sure it works:
d3.select(".d3div").transition()
.duration(750)
.style("background-color", "black");
this job. However:
var colors = d3.scale.category10().domain([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
this gives an error:
myd3.js: 1 Uncaught TypeError: cannot read property 'category10' of undefined
and I also try another function:
d3.scale.linear()
have some errors:
myd3.js: 3 Uncaught TypeError: cannot read property 'linear' of undefined
if I changed the import to
<script src="https://d3js.org/d3.v3.js"></script>
then it works for functions, but the animation transitionno longer works.
I want to use the latest version. but it seems that there are changes in the area of which I do not know.
How can i solve this?
source
share