Reputation: 73
I am trying to see the previous graph after drill down in echarts bargraph. I have changed the setOption after the user clicks the bar series.
User click on the bar series and then the graph will change. I want to visit the previous graph before clicking.
bargraph.on('click',function(params){
if(params.componentType == 'series'&& params.name =='shirt')
setInterval(function(){
bargraph.setOption(baroption2)
},200);
})
Upvotes: 1
Views: 464
Reputation: 2456
You should store the previous graph's option like previousOption
,
When you want to see the previous graph, use setOption(previousOption)
.
Now you can see the previous graph again.
Upvotes: 1