1

我有世界地图。我想将每个国家的颜色更改为黑色。

在此处输入图像描述

我怎么才能得到它?

{
backgroundColor: '#1b1b1b',
color: ['gold','aqua','lime'],
title : {
    text: '模拟迁徙',
    subtext:'数据纯属虚构',
    x:'center',
    textStyle : {
        color: '#fff'
    }
},
tooltip : {
    trigger: 'item',
    formatter: '{b}'
},
legend: {
    orient: 'vertical',
    x:'left',
    data:['北京 Top10', '上海 Top10', '广州 Top10'],
    selectedMode: 'single',
    selected:{
        '上海 Top10' : false,
        '广州 Top10' : false
    },
    textStyle : {
        color: '#fff'
    }
},
toolbox: {
    show : true,
    orient : 'vertical',
    x: 'right',
    y: 'center',
    feature : {
        mark : {show: true},
        dataView : {show: true, readOnly: false},
        restore : {show: true},
        saveAsImage : {show: true}
    }
},
dataRange: {
    min : 0,
    max : 100,
    calculable : true,
    color: ['#ff3333', 'orange', 'yellow','lime','aqua'],
    textStyle:{
        color:'#fff'
    }
},
series : [
    {
        name: '全国',
        type: 'map',
        roam: true,
        hoverable: false,
        mapType: 'world',
        itemStyle:{
            normal:{
                color:'#000',
                borderColor:'rgba(100,149,237,1)',
                borderWidth:0.5,
                areaStyle:{
                    color: '#000000'
                }
            }
        },
        data:[],
        markLine : {
            smooth:true,
            symbol: ['none', 'circle'],  
            symbolSize : 1,
            itemStyle : {
                normal: {
                    color:'#000',
                    borderWidth:1,
                    borderColor:'rgba(30,144,255,0.5)'
                }
            },
            data : [

            ],
        },
        geoCoord: {

        }
    }
]
}
4

1 回答 1

0

http://echarts.baidu.com/option.html#geo.itemStyle.areaColor

你可以使用 areaColor 属性

itemStyle:{
        normal:{
            color:'#000',
            borderColor:'rgba(100,149,237,1)',
            borderWidth:0.5,
            areaColor: 'black',
            areaStyle:{
                color: '#000000'
            }
        }
    }
于 2018-05-07T08:29:23.107 回答