4.7.0
https://www.echartsjs.com/examples/en/editor.html?c=bar-animation-delay
1.) Go to Example
2.) Add this Code
myChart.on('magictypechanged',function(obj){
if (obj.currentType == "stack"){
alert("stack: " obj.currentType);
}else{
alert("tiled:" obj.currentType);
}
});
toggle between stack and tiled
currentType is always "stack"
I'm looking now for the stack word in the newOption.series[0].stack to be either "" or "__ec_magicType_stack__", but it should not be this way.
Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical questions.
If you are interested in the project, you may also subscribe our mail list.
Have a nice day! 🍵
I've tried to fix it, it seems to be working well. But in another case, if we specify the option stack for series(refer to series-line.stack), does the stack icon in the toolbox need to be emphasized(selected) by default at the very first rendering. Any idea?
I suppose the stack icon should be emphasized if we set option stack for series at initial stage. The state should be synced between the series and the toolbox.
Thanks for your investigation @plainheart ~ You can refer to previous key changes on this toolbox stack things.
To put it simply, at first we want to simplify the stack icon status, integrate two icons into one toggle icon. so I removed tiled type and keep only one stack icon.
The fisrt commit about this topic: https://github.com/apache/incubator-echarts/commit/e7af6731d048dff489d16e806eab6f5772d32c08
Then we made some revision, removed the tiled icon and type. https://github.com/apache/incubator-echarts/commit/780614906e19fa6a7c5072fcdae2635ad7ac7840
Maybe here we can do more things to make sure the magictypechanged event emit correct type, at the same time keep our enhancement months ago. @pissang
@alex2wong there is a linked pr awaiting review