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.
I solved with: scaleLimit is explained here
You can do so as below,
echartInstance.dispatchAction({
type: 'dataZoom',
start: 90,
end: 100
});
Use zoom property of series object.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.