You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/01/23 04:12:01 UTC

[GitHub] katherinebai opened a new issue #9827: If map chart used visualMap element, the series data itemStyle areaColor won't work.

katherinebai opened a new issue #9827: If map chart used visualMap element, the series data itemStyle areaColor won't work.
URL: https://github.com/apache/incubator-echarts/issues/9827
 
 
   In fact, when I remove the visualMap element, the series data itemStyle will work well. But I think the itemStyle in series data item has higher priority.
   ![image](https://user-images.githubusercontent.com/36399340/51582672-0ecc9a00-1f08-11e9-9b14-2db2eeb7f431.png)
   
   
   The options as following:
   
   myChart.showLoading();
   
   $.get('data/asset/geo/HK.json', function (geoJson) {
   
       myChart.hideLoading();
   
       echarts.registerMap('HK', geoJson);
   
       myChart.setOption(option = {
   	"animation": true,
   	"backgroundColor": "#EEECE1",
   	"tooltip": {
   		"trigger": "item"
   	},
   	"series": [{
   		"name": "系列1",
   		"type": "map",
   		"data": [{
   			"name": "Central and Western",
   			"value": 1,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Eastern",
   			"value": 2,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Islands",
   			"value": 3,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Kowloon City",
   			"value": 4,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Kwai Tsing",
   			"value": 5,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Kwun Tong",
   			"value": 6,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "North",
   			"value": 7,
   			"itemStyle": {
   				"areaColor": "#F79646"
   			},
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Sai Kung",
   			"value": 8,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Sha Tin",
   			"value": 9,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Sham Shui Po",
   			"value": 10,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Southern",
   			"value": 11,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Tai Po",
   			"value": 12,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Tsuen Wan",
   			"value": 13,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Tuen Mun",
   			"value": 14,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Wan Chai",
   			"value": 15,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Wong Tai Sin",
   			"value": 16,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Yau Tsim Mong",
   			"value": 17,
   			"label": {
   				"show": false
   			}
   		}, {
   			"name": "Yuen Long",
   			"value": 18,
   			"label": {
   				"show": false
   			}
   		}],
   		"mapType": "HK"
   	}],
   	"visualMap": {
   		"type": "piecewise",
   		"calculable": true,
   		"orient": "horizontal",
   		"left": "right",
   		"top": "top",
   		"max": 25,
   		"min": 0,
   		"pieces": [{
   			"lt": 0
   		}, {
   			"gte": 0,
   			"lt": 10
   		}, {
   			"value": 10
   		}, {
   			"gte": 10,
   			"lt": 20
   		}, {
   			"gte": 20,
   			"lte": 25
   		}],
   		"color": ["#bed2e6", "#96b6d8", "#6d99c9", "#457cb9", "#355f8c"]
   	},
   });
   });

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org