echarts icon indicating copy to clipboard operation
echarts copied to clipboard

geo world可以改变地区的颜色吗,

Open chm74 opened this issue 10 years ago • 2 comments

问题简述 (One-line summary)

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):
  • 浏览器类型和版本 (Browser version):
  • 操作系统类型和版本 (OS Version):

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

var data = [
     {name: '大庆', value: 2739000}
];
var geoCoordMap = {

    '大庆':[125.03,46.58]
};

var convertData = function (data) {
    var res = [];
    for (var i = 0; i < data.length; i++) {
        var geoCoord = geoCoordMap[data[i].name];
        if (geoCoord) {
            res.push({
                name: data[i].name,
                value: geoCoord.concat(data[i].value)
            });
        }
    }
    return res;
};

option = {

    visualMap: {
        min: 0,
        max: 1000000,
        text:['High','Low'],
        realtime: false,
        calculable: true,
        color: ['orangered','yellow','lightskyblue']
    },
    series : [
        {
            type: 'effectScatter',
            coordinateSystem: 'geo',
            data: convertData(data.sort(function (a, b) {
                return b.value - a.value;
            }).slice(0, 6)),
            symbolSize:5,
            showEffectOn: 'render',
            rippleEffect: {
                brushType: 'fill',
                scale:10

            },
            symbol:'circle',
            hoverAnimation: true,
            label: {
                normal: {
                    formatter: '{b}',
                    position: 'right',
                    show: true
                }
            },
            itemStyle: {
                normal: {
                    color: '#f4e925',
                    shadowColor: '#333'
                }
            },
            zlevel: 1
        }
    ],
    geo: {
        map: 'world',
        label: {
            emphasis: {
                show: false
            }
        },
        roam: true,
        itemStyle: {
            normal: {
                areaColor: '#323c48',
                borderColor: '#111'
            },
            emphasis: {
                areaColor: '#2a333d'
            }
        }

    }
};

其他信息 (Other comments)

chm74 avatar Apr 28 '16 08:04 chm74

暂时不行,最近会加入这个功能

pissang avatar Apr 29 '16 01:04 pissang

这个功能加上了吗?如何使用?

jacklifan1984 avatar Nov 11 '16 09:11 jacklifan1984