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

小程序中国地图、关系图拖拽问题 #91

Open
GGGiRaffe opened this issue Nov 17, 2020 · 1 comment
Open

小程序中国地图、关系图拖拽问题 #91

GGGiRaffe opened this issue Nov 17, 2020 · 1 comment

Comments

@GGGiRaffe
Copy link

小程序上无法拖拽缩放

@GGGiRaffe
Copy link
Author

地图配置 let option = {
//左侧颜色图例
visualMap: { //地图颜色配置
type: "continuous",
text: ["高", "低"],
show: false,
showLabel: true,
seriesIndex: [0],
min: 1,
max: data.length > 0 ? data[0].value : 7,
inRange: {
//color: "#fff"
color: ["#ebf5ff", "#b2dfff", "#94d0fd", "#80c8ff", "#7abcff", "#66b2fd", "#6799ff"]
},
textStyle: {
color: "#000"
},
bottom: 30,
left: 20,
right: 20
},
series: [{
type: 'map',
map: 'china',
roam: true,
zoom: 1.2, //当前视角的缩放比例
label: {
normal: {
formatter: function(params) {
//console.log(params)
//return
let text = '';
if(params.data){
if(params.data.value==0){
text = ''
}else if(params.data.value<1000){
text = params.data.value;
}else{
text = (params.data.value / 1000).toFixed(2) + "k+";
}
}
return text
},
show: true, //显示省份标签
textStyle: {
color: "ecomfe#333",
fontSize: 10
} //省份标签字体颜色
}
},
data: data,
itemStyle: {
emphasis: {
areaColor: "#fff464" //鼠标悬浮在地图上的颜色
},
normal: {
areaColor: '#DAFCFD', //设置地图省市背景
borderWidth: 1, //设置地图外层边框
borderColor: '#f5f5f5',
}
},
}],
}
@F-loat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant