(此文档仅供参考)

问题

有时为了美观,想实现地图标签字体颜色修改。

实现方法

在echarts扩展属性中添加此段代码即可。

{
    "geo": {
        "label": {
            "normal": {
                "show": true,
                "textStyle": {
                    "color": "blue"
                }
            }
        }
    }
}

如果需要修改地图的鼠标滑动过去字体的颜色,可以参考下面的扩展属性:

{
	"geo": {
		"label": {
			"normal": {
				"show": true,
				"textStyle": {
					"fontSize": 15,
					"color": "#FF0000"
						}
					},
			//鼠标滑动过去字体的颜色
			"emphasis": {
				"color": "#5858FA"
				}
			}
		}
}


修改后的效果如下:

鼠标滑动到新疆的位置,新疆的字体改变