echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Echarts3中series为graph,layout为‘none’时,data中的x,y怎么设置?

Open yishangtanhuan opened this issue 9 years ago • 8 comments

One-line summary [问题简述]

Echarts3中series为graph,layout为‘none’时,data中的x,y怎么设置?每个点 x,y随机值 [ 随机值限定一个范围 ] ?

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:echarts3
  • Browser version [浏览器类型和版本]:chrome 56
  • OS Version [操作系统类型和版本]:win10

Expected behaviour [期望结果]

不清楚x,y怎么设置

yishangtanhuan avatar May 03 '17 09:05 yishangtanhuan

layout 为 none 的话,x,y 就是你自己对关系图布局的结果。所以如果你没有其它算法对关系图进行布局的话不要设置为 none

pissang avatar May 03 '17 09:05 pissang

@pissang 请问x、y是相对于那个点,我设置一个点的x和y都为0,节点为什么没有渲染到画布的左下角?谢谢~~~

Naslang avatar Aug 07 '17 08:08 Naslang

我也有相同的问题,设置layout 为 none,设置x,y关系图的位置总是没有按预期显示,不知道x,y的定位是相对于什么的

githubrab avatar Dec 18 '17 16:12 githubrab

是相对位置吧,如何设置绝对位置啊

ArrayZheng avatar Mar 22 '18 03:03 ArrayZheng

有同样的疑惑,不明白这两个值到底如何设置,什么叫「你自己对关系图布局的结果」?

根据文档里的说明: image

我的理解是,只有 none 才会对 x、y 生效,另外两个是环形布局和力引导布局,都不是我们希望使用的布局。

我们的需求其实就是,如何确切地知道应如何设置每个元素的位置。比如我想设置 2 行 3 列一共 6 个圆的布局,每个圆的直径是 50,圆心距离是 60,应如何设置?

JasinYip avatar Feb 14 '19 09:02 JasinYip

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Sep 03 '21 08:09 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Sep 10 '21 21:09 github-actions[bot]

我也有相同的问题!

candy4290 avatar May 14 '24 03:05 candy4290