<!DOCTYPE html>
<meta charset="utf-8">
<!-- load D3js -->
<script src="https://d3js.org/d3.v3.js"></script>
<!-- load D3plus after D3js -->
<script src="https://d3plus.org/js/d3plus.js"></script>
<!-- create container element for visualization -->
<div id="viz"></div>
<script>
// sample data array
d3.csv("DataVis.csv", function(data){
console.log(data);
});
// instantiate d3plus
var visualization = d3plus.viz()
.container("#viz") // container DIV to hold the visualization
.data(data) // data to use with the visualization
.type("tree_map") // visualization type
.id("Name") // key for which our data is unique on
.size("Amount Spent") // sizing of blocks
.draw() // finally, draw the visualization!
</script>
我一直在这部分出错,我不知道该怎么做。我会喜欢任何反馈
慕桂英4014372
慕容708150
相关分类