我正在制作我的第一个 d3plus 图表并尝试在此处复制一个 https://d3plus.org/examples/d3plus-geomap/coordinate-points/
但与 highcharts 不同,关于如何使用图表的解释很少。我目前的代码是:
<script src="./d3plus.full.min.js"></script>
<div id="viz"> </div>
<script>
new d3plus.Geomap()
.container("#viz")
.data("https://d3plus.org/data/city_coords.json")
.groupBy("slug")
.colorScale("dma_code")
.colorScaleConfig({
color: ["red", "orange", "yellow", "green", "blue"]
})
.label(function(d) {
return d.city + ", " + d.region;
})
.point(function(d) {
return [d.longitude, d.latitude];
})
.render();
</script>
我收到错误:d3plus.Geomap 不是构造函数。有人可以告诉我我的错误或指向基本的 d3plus 示例吗