如何解决带有“国家/我们/我们所有人”的 MapChart
我无法绑定我们所有国家/地区的高级地图。
我在数据系列中有错误,下面是我的地图配置。
导入文件
import { MapChart } from 'angular-highcharts';
import * as Highcharts from 'highcharts/highmaps';
import * as usJson from 'src/assets/maps/us-all.geo.json';
地图配置
new MapChart({
chart: {
map: usJson
},title: {
text: "Highmaps basic demo"
},subtitle: {
text:
'Source map: <a href="http://code.highcharts.com/mapdata/custom/world.js">World,Miller projection,medium resolution</a>'
},mapNavigation: {
enabled: true,buttonOptions: {
alignTo: "spacingBox"
}
},legend: {
enabled: true
},colorAxis: {
min: 0
},series: [
{
type: 'mappoint',mapData: usJson,name: 'Cities',data: [
{
"value": 438,"code": "nj"
},{
"value": 387.35,"code": "ri"
}
]
}],});
}
}
还在应用模块文件中添加了 highmaps
模块。
*这里是所有系列的数据链接。 https://cdn.jsdelivr.net/gh/highcharts/highcharts@v7.0.0/samples/data/us-population-density.json
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。