You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/12/27 07:26:06 UTC

[GitHub] hadg opened a new issue #9648: 关系图在大量节点的时候使用edgeSymbolSize会导致标签虚化

hadg opened a new issue #9648: 关系图在大量节点的时候使用edgeSymbolSize会导致标签虚化
URL: https://github.com/apache/incubator-echarts/issues/9648
 
 
   官方的例子(http://echarts.baidu.com/examples/editor.html?c=graph-npm)
   
   正常显示:
   ![image](https://user-images.githubusercontent.com/4592450/50470396-415ba380-09eb-11e9-9966-5ba233e71851.png)
   加入edgeSymbol: ['none', 'arrow']属性后标签虚化了:
   ![image](https://user-images.githubusercontent.com/4592450/50470453-7831b980-09eb-11e9-8c75-69ff51b936ca.png)
   
   修改后的代码:
   ````myChart.showLoading();
   $.getJSON('data/asset/data/npmdepgraph.min10.json', function (json) {
       myChart.hideLoading();
       myChart.setOption(option = {
           title: {
               text: 'NPM Dependencies'
           },
           animationDurationUpdate: 1500,
           animationEasingUpdate: 'quinticInOut',
           series : [
               {
                   type: 'graph',
                   layout: 'none',
                   // progressiveThreshold: 700,
                   edgeSymbol: ['none', 'arrow'],
                   data: json.nodes.map(function (node) {
                       return {
                           x: node.x,
                           y: node.y,
                           id: node.id,
                           name: node.label,
                           symbolSize: node.size,
                           itemStyle: {
                               normal: {
                                   color: node.color
                               }
                           }
                       };
                   }),
                   edges: json.edges.map(function (edge) {
                       return {
                           source: edge.sourceID,
                           target: edge.targetID
                       };
                   }),
                   label: {
                       emphasis: {
                           position: 'right',
                           show: true
                       }
                   },
                   roam: true,
                   focusNodeAdjacency: true,
                   lineStyle: {
                       normal: {
                           width: 0.5,
                           curveness: 0.3,
                           opacity: 0.7
                       }
                   }
               }
           ]
       }, true);
   });
   ````
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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