<!doctype html>
<html>
<head>
<title>Transitions Tutorial</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<script>
d3.json("myData.json",function(data){
var canvas= d3.select("body").append("svg")
.attr("width",500)
.attr("height",500);
canvas.selectAll("rect")
.data(data)
.enter()
.append("rect")
.attr("width",function(d){return d.age*10;})
.attr("height",48)
.attr("y",function(d,i){ i*48;})
.attr("fill","blue");
})
//console.log(d3);
</script>
</body>
</html>
以下html是从json文件myData.json中提取数据 我收到此错误消息:“无法加载文件:/// D:/Java/D3_DEMO/myData.json:交叉源请求仅支持协议方案:http,数据,chrome,chrome-extension,https。”