520320 (1) [Avatar] Offline
Hi Curran

trying your examples from chap.1 2 i realized that they would not work if i reorganize a code like:

<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://d3js.org/d3.v4.min.js"></script>

your d3.js example

<svg width="960" height="500"></svg>

in a real life it's quite important to keep js part separated and not under svg tag in html body
how to do it? i thing it belongs to a core

stevegw (39) [Avatar] Offline
You could add some script that creates the svg

myElement.append('<svg id="' + chartElementId + '" style="width:100%; height:100%;"></svg>');

where myElement is a jqElement and chartElementId is some id