elephantme opened a new issue #11459: 桑基图自定义tooltip时,node节点数据没有总数
URL: https://github.com/apache/incubator-echarts/issues/11459
 
 
   ### Version
   4.4.0
   
   ### Steps to reproduce
   官方示例上只使用了自定义formatter
   
   myChart.showLoading();
   $.get(ROOT_PATH   'data/asset/data/energy.json', function (data) {
       myChart.hideLoading();
   
       myChart.setOption(option = {
           title: {
               text: 'Sankey Diagram'
           },
           draggable: false,
           tooltip: {
               trigger: 'item',
               formatter: function (params) {
                   // console.log(params)
                   if (params.dataType == 'node') {
                       console.log(params.value)
                   }
               },
               // triggerOn: 'mousemove'
           },
           series: [
               {
                   type: 'sankey',
                   data: data.nodes,
                   links: data.links,
                   focusNodeAdjacency: 'allEdges',
                   itemStyle: {
                       normal: {
                           borderWidth: 1,
                           borderColor: '#aaa'
                       }
                   },
                   lineStyle: {
                       normal: {
                           color: 'source',
                           curveness: 0.5
                       }
                   }
               }
           ]
       });
   });
   
   ### What is expected?
   输出总数(params.value)
   
   ### What is actually happening?
   undefined
   
   ---
   默认是有总数的,使用自定义得不到该数据
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to