This turned out to be due to an internal change in the d3 export method. Version 3.x d3 branch exported all its internal components as global variables ( source code ); Version 4.x no longer does this ( source code ). Instead, a package manager (such as require.js ) is expected, and the export will be sent to it instead.
For more information, see the GitHub props .
Now you should do something like:
<script src="scripts/require.js"></script> <script>var d3 = require('d3')</script>
After that, everything should work as expected.
source share