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 15:23:40 UTC

[GitHub] [incubator-echarts] Alextrasza67 opened a new issue #11461: graph关系图是否支持链路高亮

Alextrasza67 opened a new issue #11461: graph关系图是否支持链路高亮
URL: https://github.com/apache/incubator-echarts/issues/11461
 
 
   ### What problem does this feature solve?
   目前想通过echarts绘制应用系统架构图,发现使用graph关系图,可以很好体现应用之间关系,但是后续有些请求在应用之间的链路关系目前没有看到有哪些api可以绘制。
   focusNodeAdjacency: true 可以通过指针触发自身、邻接节点、links高亮,
   目前echarts是否支持指定某条链路高亮,
   例如示例网站:https://www.echartsjs.com/examples/zh/editor.html?c=graph 中 
   fanzine、fanzine>valjean、valjean、valjean >labarre、labarre 
   仅这3个节点及2个links高亮,这样可以利用相关API绘制基于服务器架构的请求链路图
   
   ### What does the proposed API look like?
   series中添加highlights对象可以指定高亮的data以及link即可,例如:
   ```
   series : [{
           type: 'graph', 
           data: [{ name: '节点1',  x: 300,  y: 300 }, 
                   { name: '节点2',  x: 800,  y: 300 }, 
                   { name: '节点3',  x: 550,  y: 100 }, 
                   { name: '节点4',  x: 550,  y: 500 },
                   { name: '节点5',  x: 100,  y: 300,  draggable: true }],         
           links: [{ source: 0,  target: 1}, 
                   { source: '节点2',  target: '节点1' }, 
                   { source: '节点1',  target: '节点3' }, 
                   { source: '节点2',  target: '节点3' }, 
                   { source: '节点2',  target: '节点4' }, 
                   { source: '节点1',  target: '节点4' }],            
           highlights: {
               dataIndex: [0,1,2],
               linkIndex: [0,3]
           }
       }
   ]
   ```
   
   <!-- 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