You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/11/06 11:45:47 UTC

[GitHub] [incubator-echarts] deqingli commented on a change in pull request #11556: fix tree diagram leaves label formatter don't work #11385 #8534

deqingli commented on a change in pull request #11556: fix tree diagram leaves label formatter don't work #11385 #8534 
URL: https://github.com/apache/incubator-echarts/pull/11556#discussion_r343051685
 
 

 ##########
 File path: src/chart/tree/TreeSeries.js
 ##########
 @@ -47,7 +47,18 @@ export default SeriesModel.extend({
 
         treeOption.leaves = leaves;
 
-        var tree = Tree.createTree(root, this, treeOption);
+        var tree = Tree.createTree(root, this, treeOption, beforeLink);
+
+        function beforeLink(nodeData) {
+            nodeData.wrapMethod('getItemModel', function (model, idx) {
+                var node = tree.getNodeByDataIndex(idx);
+                var leavesModel = node.getLeavesModel();
+                if (node.children.length === 0 || (node.children.length !== 0 && node.isExpand === false)) {
 
 Review comment:
   Thank you for your suggestion, I have fixed it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org