Я хочу сделать диаграмму P ie на основе библиотеки d3plus. Я пытаюсь использовать приведенный ниже код (но у меня проблема, d3plus.P ie не является конструктором )
<html>
<head>
<title>D3Plus</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3plus/1.9.8/d3plus.full.js"></script>
</head>
<body>
<script>
var myData = [
{"Group": "Store", "Sub-Group": "Convenience Store", "Number of Food Stores": 100},
{"Group": "Store", "Sub-Group": "Grocery Store", "Number of Food Stores": 150},
{"Group": "Store", "Sub-Group": "Farmer's Market", "Number of Food Stores": 50},
{"Group": "Store", "Sub-Group": "Supercenters", "Number of Food Stores": 30},
{"Group": "Restaurant", "Sub-Group": "Fast-Food Restaurant", "Number of Food Stores": 60},
{"Group": "Restaurant", "Sub-Group": "Full-Service Restaurant", "Number of Food Stores": 120}
];
new d3plus.Pie()
.config({
data: myData,
groupBy: ["Group", "Sub-Group"],
value: function(d) {
return d["Number of Food Stores"];
}
})
.render();
</script>
</body>
</html>