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/10/22 11:50:54 UTC

[GitHub] [incubator-echarts] elephantme opened a new issue #11459: 桑基图自定义tooltip时,node节点数据没有总数

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:
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