ReferenceError: d3 is not defined using web-maker

ReferenceError: d3 is not defined using web-maker

我关注了这个instruction, entering the complete code into the HTML pane of web-maker:

<!doctype html>
<html>
<head>
    <title>D3 tutorial</title>
    <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
    <!--<script src="d3.min.js"></script>-->
</head> 
<body>
    <script>
        var canvas = d3.select("body")
                        .append("svg")
                        .attr("width", 500)
                        .attr("height", 500);
        var circle = canvas.append("circle")
                        .attr("cx",250)
                        .attr("cy", 250)
                        .attr("r", 50)
                        .attr("fill", "red");
    </script>
</body> 
</html>

这会导致出现空白页。

我将脚本 "content" 移动到 JS 窗格,结果是 "ReferenceError: d3 is not defined"。

脚本内容将移动到JS面板。但是外部脚本需要通过"Add library"按钮加载。在 "Add library" 框中,只需从流行库列表中选择 select D3。