im67 commented on issue #19289:
URL: https://github.com/apache/echarts/issues/19289#issuecomment-2661915669

   In the data of the series, the collapsed field controls expansion/collapse. 
So a feasible way is to modify the value of the collapsed field in the click 
event for expansion/collapse. A simple example is as follows:
   ```
       treeChart.on('click', function (params) {
           if (params.componentType === 'series') {
               params.data.collapsed = !params.data.collapsed;
           }
       });
   
     // on Zoom
   const onZoom = () => {
     const opt = treeChart.getOption();
     treeChart.setOption({
       series: [
           {
               zoom: opt.series[0].zoom + 0.1
           }
       ]
     })
   }
   ```
   then you can see that the expanded/collapsed state is correctly preserved. 
As a temporary solution, I hope it can help others
   :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to