Closed zw231212 closed 7 years ago
你的 echarts 具体版本是?
@100pah 昨天是使用npm直接install的,今天试着从官网上下了完整的577kb的min.js,也是一样没起作用,也试着使用了在示例那边拿过来的all.js,还是没什么反应。
option = {
graphic: [{
id: 'left-btn',
type: 'circle',
shape: { r: 20 },
style: {
text: '<',
fill: '#eee'
},
left: 10,
top: 'middle',
onclick: function () {
currentIdx -= 1;
if (currentIdx < 0) {
currentIdx += provinces.length;
}
showProvince();
}
}, {
id: 'right-btn',
type: 'circle',
shape: { r: 20 },
style: {
text: '>',
fill: '#eee'
},
top: 'middle',
right: 10,
onclick: function () {
currentIdx = (currentIdx + 1) % provinces.length;
showProvince();
}
}],
series: []
};
这个 option 你有用 setOption 设置么?
@pissang 这个正解,在showProvince()后面还要加setOption
One-line summary [问题简述]
echarts 各个省份查看的示例中的箭头问题 http://echarts.baidu.com/demo.html#map-province
Version & Environment [版本及环境]
Expected behaviour [期望结果]
没有左右的箭头,配置没有起作用,示例的配置基本上都没有动
ECharts option [ECharts配置项]
Other comments [其他信息]