{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/5654","repository_url":"https://api.github.com/repos/ecomfe/echarts","labels_url":"https://api.github.com/repos/ecomfe/echarts/issues/5654/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/echarts/issues/5654/comments","events_url":"https://api.github.com/repos/ecomfe/echarts/issues/5654/events","html_url":"https://github.com/ecomfe/echarts/issues/5654","id":225923802,"number":5654,"title":"当graph-force中接受的node和edge数量过多时，渲染会很慢","user":{"login":"Se7enGo","id":20393300,"avatar_url":"https://avatars2.githubusercontent.com/u/20393300?v=3","gravatar_id":"","url":"https://api.github.com/users/Se7enGo","html_url":"https://github.com/Se7enGo","followers_url":"https://api.github.com/users/Se7enGo/followers","following_url":"https://api.github.com/users/Se7enGo/following{/other_user}","gists_url":"https://api.github.com/users/Se7enGo/gists{/gist_id}","starred_url":"https://api.github.com/users/Se7enGo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Se7enGo/subscriptions","organizations_url":"https://api.github.com/users/Se7enGo/orgs","repos_url":"https://api.github.com/users/Se7enGo/repos","events_url":"https://api.github.com/users/Se7enGo/events{/privacy}","received_events_url":"https://api.github.com/users/Se7enGo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-05-03T09:09:37Z","updated_at":"2017-06-22T07:04:56Z","closed_at":null,"body":"<!--\r\n为了方便我们能够复现和修复 bug，请遵从下面的规范描述您的问题。\r\n-->\r\n\r\n### One-line summary [问题简述]\r\n为了描述一个大的关系网络，我选择使用了echarts中的graph-force来展示。\r\n有个案例样本是node数量为5000左右，edge数量为30000左右，会使渲染变得很慢。\r\n\r\n\r\n### Version & Environment [版本及环境]\r\n+ ECharts version [ECharts 版本]:Echarts 3.5.3\r\n+ Browser version [浏览器类型和版本]:IE 11.0.9600.16428\r\n+ OS Version [操作系统类型和版本]:win7 32位\r\n\r\n\r\n\r\n### Expected behaviour [期望结果]\r\n对于echarts的使用并不是很熟练，希望得到官方网的建议\r\n能否给我优化option的建议，比如哪些效果是影响展示效率的。\r\n是否有关于graph-force部分的压力测试数据，多少数据量是可以接受的范围？\r\n\r\n### ECharts option [ECharts配置项]\r\n<!-- Copy and paste your 'echarts option' here. -->\r\n<!-- [下方贴你的option，注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->\r\n```javascript\r\noption = {\r\n        title: {\r\n\t\ttext: '关系网络',\r\n\t\tsubtext: 'Default layout',\r\n\t\ttop: 'bottom',\r\n\t\tleft: 'right'\r\n\t},\r\n\ttooltip: {\r\n\t\ttrigger:\"item\",\r\n\t\tformatter:function(params){\r\n\t\t\tvar res=\"\";\r\n\t\t\tif(params.data.source){\r\n\t\t\t\tres+='额外信息'+params.data.value;\r\n\t\t\t}else{\r\n\t\t\t\tres = '关系名称'+(params.data.name)\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t},\r\n\ttoolbox:{\r\n\t\tleft：'right',\r\n\t\ttop:'top',\r\n\t\tfeature:{\r\n\t\t\trestore:{},\r\n\t\t\tsaveAsImage:{\r\n\t\t\t\ttype:'jpeg'\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tanimation:false,\r\n\tseries: [{\r\n\t\t\ttype: 'graph',\r\n\t\t\tlayout: 'force',\r\n\t\t\tdraggable:true,\r\n\t\t\tedgeSymbol:['','arrow'],\r\n\t\t\tedgeSymbolSize:5,\r\n\t\t\tdata: json.nodes.map(function(node){\r\n\t\t\t\treturn {\r\n\t\t\t\t\tid:node.id,\r\n\t\t\t\t\tname:node.name,\r\n\t\t\t\t\tvalue:node.value,\r\n\t\t\t\t\tlabel:{\r\n\t\t\t\t\t\tnormal:{\r\n\t\t\t\t\t\t\tshow:true,\r\n\t\t\t\t\t\t\tposition:'inside'\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsymbolSize:6,\r\n\t\t\t\t\tsymbol:'circle'\r\n\t\t\t\t};\r\n\t\t\t}),\r\n\t\t\tlinks: json.edges.map(function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\tsource:edge.sourceID,\r\n\t\t\t\t\ttarget:edge.targetID,\r\n\t\t\t\t\tvalue:edge.value\r\n\t\t\t\t};\r\n\t\t\t}),\r\n\t\t\troam: true,\r\n\t\t\tlabel: {\r\n\t\t\t\tnormal: {\r\n\t\t\t\t\tposition: 'right'\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tforce: {\r\n\t\t\t\trepulsion: 100\r\n\t\t\t},\r\n\t\t\tfocusNodeAdjacency:true\r\n\t\t}\r\n\t]\r\n}\r\n\r\n```\r\n\r\n\r\n\r\n\r\n### Other comments [其他信息]\r\n<!-- For example: Screenshot or Online demo -->\r\n<!-- [例如，截图或线上实例 (JSFiddle/JSBin/Codepen)] -->\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/comments/310294548","html_url":"https://github.com/ecomfe/echarts/issues/5654#issuecomment-310294548","issue_url":"https://api.github.com/repos/ecomfe/echarts/issues/5654","id":310294548,"user":{"login":"ah-kevin","id":10068519,"avatar_url":"https://avatars0.githubusercontent.com/u/10068519?v=3","gravatar_id":"","url":"https://api.github.com/users/ah-kevin","html_url":"https://github.com/ah-kevin","followers_url":"https://api.github.com/users/ah-kevin/followers","following_url":"https://api.github.com/users/ah-kevin/following{/other_user}","gists_url":"https://api.github.com/users/ah-kevin/gists{/gist_id}","starred_url":"https://api.github.com/users/ah-kevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ah-kevin/subscriptions","organizations_url":"https://api.github.com/users/ah-kevin/orgs","repos_url":"https://api.github.com/users/ah-kevin/repos","events_url":"https://api.github.com/users/ah-kevin/events{/privacy}","received_events_url":"https://api.github.com/users/ah-kevin/received_events","type":"User","site_admin":false},"created_at":"2017-06-22T07:04:56Z","updated_at":"2017-06-22T07:04:56Z","body":"@pissang 你好,我这边有个Demo,3跟2的布局差很多,而且3碰撞的时候很奇怪..到500个点的时候就卡了."}}
{"actor":{"display_login":"ah-kevin"}}