alex1504 opened a new issue #9520: echarts关系节点图怎么直接显示name字段?
URL: https://github.com/apache/incubator-echarts/issues/9520
 
 
   由于项目需求,需要直接显示echarts关系节点的name字段,而非鼠标移入节点的时候才显示。如图:
   ![demo](http://www.pic68.com/uploads/2018/12/a.png)
   
   是否有支持直接显示节点name属性的配置呢?
   
   目前echarts的配置如下:
   ```js
   option = {
       legendHoverLink: false,
       tooltip: {
           show: true,
           formatter: '{b0}'
       },
       legend: {
           data: [
               {
                   name: '文件',
                   icon: "image://../image/file.png"
               }, {
                   name: '文件块',
                   icon: "image://../image/chunk.png"
               }, {
                   name: '节点',
                   icon: "image://../image/node.png"
               }
           ]
       },
       series: [
           {
               type: 'graph',
               layout: 'force',
               animation: false,
               edgeSymbol: [
                   'none', 'arrow'
               ],
               label: {
                   show: false,
                   position: 'bottom',
                   color: "#666"
               },
               symbolSize: 60,
               draggable: true,
               data: webkitDep
                   .nodes
                   .map(function (node, idx) {
                       node.id = idx;
                       return node;
                   }),
               categories: webkitDep.categories,
               force: {
                   initLayout: 'circular',
                   repulsion: 2000,
                   edgeLength: 300
   
               },
               edges: webkitDep.links
           }
       ]
   };
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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