dictionary - Amchart:改变 MapChart 错误的颜色
问题描述
我有一个没有颜色的世界地图图表(国家默认为灰色,海洋默认为白色):
我的代码:
var container = am4core.create("concatChart", am4core.Container);
container.width = am4core.percent(100);
container.height = am4core.percent(100);
this.mapChart = container.createChild(am4maps.MapChart);
this.mapChart.geodata = am4geodata_continentsHigh;
this.mapChart.projection = new am4maps.projections.Miller();
var polygonSeries = this.mapChart.series.push(new am4maps.MapPolygonSeries());
polygonSeries.useGeodata = true;
我通过将这些行添加到我的代码中添加了一些颜色:
this.mapChart.backgroundSeries.mapPolygons.template.polygon.fill = am4core.color("#91c2dc");
this.mapChart.backgroundSeries.mapPolygons.template.polygon.fillOpacity = 1;
polygonSeries.mapPolygons.template.fill = am4core.color("#FFFFFF");
polygonSeries.mapPolygons.template.strokeOpacity = 0;
但它实际上被窃听了,似乎世界地图被切割了:
解决方案
推荐阅读
- php - 在centos 7服务器上安装棘轮系统
- reactjs - 如何在 React js 包 i18next.js 中设置默认语言以进行国际化而不是英语?
- r - R中的setdiff()函数应该排除数字,但事实并非如此
- arrays - 使用按钮将文本文件中的某些列导入 Excel 工作表
- firebase - Firebase中安全规则的重要性
- flutter - 文本小部件的装饰
- html - 奇怪的 scrollToView 行为
- angular - Angular Typescript getter 返回未定义
- c# - 从表单到用户控件的单击事件处理
- php - 我试图在我的 PHP 中给出我的数据库的值,但我不断得到:0 个结果