fuchunhui commented on issue #16169: URL: https://github.com/apache/echarts/issues/16169#issuecomment-1069109675
I sort out all opinions. 1. add `nodeClick` option with values of false | 'expand' | 'link' similar to [treemap series](https://echarts.apache.org/en/option.html#series-treemap.nodeClick). 2. use `collapsible / expandable` controls 'the state of node expand'. 3. deprecate `expandAndCollapse` & cover the bottom😆 & warning. am I? like to be this ``` { nodeClick: false // false | 'expand' | 'link' expandable: true // boolean } ``` Case 1 ``` nodeClick: false ``` when clicking node, chart do nothing, no event, no expand. Case 2 ``` nodeClick: 'expand' expandable: true ``` chart dispatch action 'treeExpandAndCollapse', toggle `node.isExpand` Case 3 ``` nodeClick: 'expand' expandable: false ``` only dispatch action `treeExpandAndCollapse`, no toggle. Case 4 ``` nodeClick: 'link' ``` link to url, ignore `expandable`. Finally, how to control initialization? ``` const expandAndCollapse = option.expandAndCollapse; const expandTreeDepth = (expandAndCollapse && option.initialTreeDepth >= 0) ? option.initialTreeDepth : treeDepth; ``` remove expandAndCollapse, decide by `initialTreeDepth >= 0` only. -- 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: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org