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/14 03:42:32 UTC

[GitHub] [incubator-echarts] LW728 opened a new issue #11639: 关系图中的力引导布局(graph->force)自适应问题

LW728 opened a new issue #11639: 关系图中的力引导布局(graph->force)自适应问题
URL: https://github.com/apache/incubator-echarts/issues/11639
 
 
   请问有什么办法可以让graph->force布局的图表实现尺寸自适应,随容器缩放而变化,整体不超出容器的边界?谢谢大家~
   
   option = {
       title: {
           text: 'Graph 简单示例'
       },
       tooltip: {},
       animationDurationUpdate: 1500,
       animationEasingUpdate: 'quinticInOut',
       series : [
           {
               type: 'graph',
               layout: 'force',
               force: {
                    repulsion: 3000,
                    edgeLength:[100, 500]
               },
               symbolSize: 100,
               roam: true,
               edgeSymbolSize:100,
               data: [{
                   name: '节点1',
               }, {
                   name: '节点2',
               }, {
                   name: '节点3',
               }, {
                   name: '节点4',
               }],
               // links: [],
               links: [{
                   source: '节点2',
                   target: '节点1',
               }, {
                   source: '节点1',
                   target: '节点3'
               }, {
                   source: '节点2',
                   target: '节点3'
               }, {
                   source: '节点2',
                   target: '节点4'
               }, {
                   source: '节点1',
                   target: '节点4'
               }],
           }
       ]
   };

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