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 2018/04/28 09:48:13 UTC

[GitHub] justyeh opened a new issue #8250: 无法在fullpage中使用geo

justyeh opened a new issue #8250: 无法在fullpage中使用geo
URL: https://github.com/apache/incubator-echarts/issues/8250
 
 
   
   
   ### One-line summary [问题简述]
   
   项目首页使用了fullpage,其中一屏需要展示全球业务分布,发现其他屏无法滚动到该page,直接进入该page,也无法上下翻屏,有设置roam为false
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:
   + Browser version [浏览器类型和版本]:
   + OS Version [操作系统类型和版本]:
   
   
   
   
   
   ### Expected behaviour [期望结果]
   
   能够正常的上下翻页
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   <script src="./js/echart/echarts.min.js?_v_=1519819816100"></script>
   <script src="./js/echart/world.js?_v_=1519819816100"&gt</script>
   <script type="text/javascript">
   var mapData = [
   				{ name: '深圳', value: [114.061103, 22.549257], txt: '投资管理-金融服务-国际贸易',itemStyle:{color:'#fff'} },
   				{ name: '广东其他地区', value: [112.319683, 24.17915], txt: '中纤板研发生产销售-矿产品加工及贸易',itemStyle:{color:'#fff'} },
   				{ name: '厦门', value: [118.096722, 24.486542], txt: '矿业-金属贸易-金属产业链增值业务',itemStyle:{color:'#fff'} },
   				{ name: '四川', value: [104.022503, 30.611273], txt: '新能源产业链-矿山采选-有色金属冶炼',itemStyle:{color:'#fff'} },
   				{ name: '贵州', value: [106.644117, 26.660093], txt: '有色金属矿采选-矿产品开发咨询',itemStyle:{color:'#fff'} },
   		
   				{ name: '内蒙古', value: [110.452358, 41.397643], txt: '矿业',itemStyle:{color:'#fff'} },
   				{ name: '云南', value: [102.835877, 24.86506], txt: '有色金属矿采选',itemStyle:{color:'#fff'} },
   				{ name: '上海', value: [102.835877, 24.86506], txt: '商业保理-国际贸易',itemStyle:{color:'#fff'} },
   				{ name: '北京', value: [121.453941, 31.320741], txt: '资产管理',itemStyle:{color:'#fff'} },
   				{ name: '江苏', value: [118.694347, 32.138417], txt: '新能源汽车',itemStyle:{color:'#fff'} },
   		
   				{ name: '江西', value: [115.787574, 28.695049], txt: '矿山采选',itemStyle:{color:'#fff'} },
   				{ name: '香港', value: [114.211443, 22.266855], txt: '资源投资-设备进出口-大宗商品贸易' ,itemStyle:{color:'#fff'}},
   				{ name: '澳大利亚', value: [134.479227, -23.710532], txt: '矿产资源' ,itemStyle:{color:'#d60016'}},
   				{ name: '刚果(金)科卢韦齐', value: [23.284595, 0.172862], txt: '有色金属矿采选',itemStyle:{color:'#d60016'} },
   				{ name: '新加坡', value: [103.791165, 1.506318], txt: '国际贸易-金属产业链增值业务',itemStyle:{color:'#d60016'} },
   		
   				{ name: '英国', value: [-2.765978, 51.744415], txt: '矿产资源' ,itemStyle:{color:'#d60016'}},
   				{ name: '所罗门', value: [158.541521, -8.244491], txt: '矿产资源' ,itemStyle:{color:'#d60016'}},
   				{ name: '赞比亚', value: [25.050735, -14.772948], txt: '矿产资源',itemStyle:{color:'#d60016'} },
   				{ name: '美国', value: [-104.0247, 40.436101], txt: '新能源汽车',itemStyle:{color:'#d60016'} },
   				{ name: '西藏', value: [91.11917,29.658167], txt: '矿山采选-矿产品贸易',itemStyle:{color:'#fff'} },
   			]
   		
   			var myChart = echarts.init(document.getElementById('map'));
   			option = {
   				backgroundColor: 'transparent',
   				title: {
   					show: false
   				},
   				tooltip: {
   					trigger: 'item',
   					formatter: function (params) {
   						return '<div class="tooltip"><div><h2>' + params.data.name + '</h2><p>' + params.data.txt + '</p></div></div>'
   					},
   					padding: 0,
   					borderRadius: 160
   				},
   				geo: {
   					name: 'World Population (2010)',
   					center: [14, 25],
   					type: 'map',
   					map: 'world',
   					zoom: '1.3', //缩放级别
   					roam: false, //鼠标缩放,
   					aspectScale: 0.8,
   					label: {
   						emphasis: {
   							show: false
   						},
   					},
   					itemStyle: {
   						areaColor: '#eee', //国土颜色
   						borderColor: '#999'  //国界线颜色
   					},
   					emphasis: {
   						itemStyle: {
   							areaColor: '#ddd'
   						}
   					},
   					regions: [{
   						name: 'China',
   						selected: true,
   						emphasis: {
   							itemStyle: {
   								areaColor: '#d60016'
   							}
   						}
   					}],
   					silent: false,
   				},
   				series: [
   					{
   						type: 'effectScatter',
   						coordinateSystem: 'geo',
   						symbolSize:8,
   						data: mapData,
   						itemStyle:{
   							borderWidth: 0,
   						},
   						rippleEffect: {
   							period: 4,
   							scale: 2.5,
   							brushType: 'fill',
   						},
   					}
   				]
   			};
   			myChart.setOption(option);
   			window.onresize = function () {
   				myChart.resize();
   			}
   		
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

----------------------------------------------------------------
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