Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm安装echarts 3.4.4 地图配置出现bug #5388

Closed
dragonHu opened this issue Mar 29, 2017 · 0 comments
Closed

npm安装echarts 3.4.4 地图配置出现bug #5388

dragonHu opened this issue Mar 29, 2017 · 0 comments
Labels

Comments

@dragonHu
Copy link

One-line summary [问题简述]

npm安装echarts 3.4.4 地图配置出现bug

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.4.4
  • Browser version [浏览器类型和版本]:chrome 56.0.2924.87
  • OS Version [操作系统类型和版本]:windows 7

Expected behaviour [期望结果]

series[0].itemStyle.normal.areaColor 颜色生效
升级到最新的echarts 3.4.4以后 .areaColor都为白色

ECharts option [ECharts配置项]

option = {
	"tooltip": {
		"trigger": "item",
		"formatter":function(params,ticket,cb){ //自定义显示框
        	params.value=params.value||0;
        	var contentHTML=params.name+" - "+params.value;
        	return contentHTML;
        }
	},
	"visualMap": {
		"min": 0,
		"max": 96.89,
		"left": 20,
		"align": "bottom",
		"type": "piecewise",
		"bottom": 25,
		"text": ["覆盖率(高-低)"],
		"calculable": true,
		"inverse": true,
		"orient": "horizontal",
		"inRange": {
			"color": ["#d1eaff", "#1a96f0"]
		},
        formatter: function (value) {
		    return  parseInt(value)||0; // 范围标签显示内容。
		}
	},
	"series": [{
		"name": "中国",
		"type": "map",
		"mapType": "china",
		"selectedMode": "multiple",
		"itemStyle": {
			"normal": {
				"areaColor": "#d1eaff",
				"borderColor": "#fff"
			},
			"emphasis": {
				"areaColor": "#f1f5f8"
			}
		},
		"data": [{
			"name": "浙江",
			"value": "96.89"
		}, {
			"name": "unknown",
			"value": "2.67"
		}, {
			"name": "其它",
			"value": "0.44"
		}]
	}]
}

Other comments [其他信息]

@pissang pissang added the bug label Mar 29, 2017
100pah added a commit that referenced this issue Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants