We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
option = { title: { text: '堆叠区域图' }, tooltip : { trigger: 'axis' }, legend: { data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎'] }, toolbox: { feature: { saveAsImage: {} } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis : [ { type : 'category', boundaryGap : false, data : ['周一','周二','周三','周四','周五','周六','周日'] } ], yAxis : [ { type : 'value' } ], series : [ { name:'邮件营销', type:'line', stack: '总量', areaStyle: {normal: {}}, data:[120, 132, 101, 134, 90, 230, 210] }, { name:'联盟广告', type:'line', stack: '总量', areaStyle: {normal: {}}, data:[220, 182, 191, 234, 290, 330, 310] } ] }; var ec=echarts.init(d3.select("#echarts_test").node()) ec.setOption(option); function test(){ option.series.pop(); //ec.clear() 如果不调用clear就会出现bug ec.setOption(option); }
The text was updated successfully, but these errors were encountered:
http://echarts.baidu.com/api.html#echartsInstance.setOption 第二个参数
Sorry, something went wrong.
@pissang 看到issue里面有多个类似的需求,所以只清除series,保持其它设置是比较普遍的需求,setOption第二个参数设置为true并不是非常好的解决方法,请问后续有没有更加优雅的解决方法。
No branches or pull requests
The text was updated successfully, but these errors were encountered: