[英]Echarts: Initial zoom in map type
There is some way to set an initial zoom in chart of map type?有什么方法可以设置地图类型图表的初始缩放?
I have this options:我有这个选项:
m.setOption({
tooltip : {
trigger: 'item'
},
toolbox: {
show : true,
orient : 'vertical',
x: 'right',
y: 'center',
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
restore : {show: true},
saveAsImage : {show: true}
}
},
asoluteZoom : {start : 90, end : 100},
series : [
{
name: 'Name',
type: 'map',
mapType: 'world',
hoverable: false,
roam:true,
data : [],
markPoint : {
symbolSize: 10,
itemStyle: {
normal: {
borderColor: '#87cefa',
borderWidth: 1,
label: {
show: false
}
},
emphasis: {
borderColor: '#1e90ff',
borderWidth: 5,
label: {
show: false
}
}
},
data : [
{name: "Hello!"},
]
},
geoCoord: {
"Hello!":[-4.729075, 37.906475],
}
}
]
}); });
I tried with asoluteZoom but nothing happens.我尝试使用asoluteZoom但没有任何反应。
You can do so as below,你可以这样做,如下所示,
echartInstance.dispatchAction({
type: 'dataZoom',
start: 90,
end: 100
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.