In the above demo (you can grab the nodes and move them around), I'm using an example taken from the book 'Interactive Data Visualization for the Web' by Scott Murray (Ch. 11, ex 4 to be specific), which I first learned about through the workshop. The key steps to get it to work properly within my blog were:
- Upload the d3.js library file, and then add the following to the 'Code Injection' section under advanced 'Blog Settings': <script src="/s/d3.js"></script>. You may also want to inject css styling there as well. This step only has to be done once, obviously.
- The key trick was to change the d3.select("body") to d3.select(".mydiv") , which will then place the svg element within the custom div tag.
That's all there is to it. I'm excited to start creating my own visualizations!