antvis/G6

辐射型布局如何控制辐射方向和辐射角度 #2484

Youmyin posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

当树结构变成辐射树的时候,需要将direction改为RL,最终的辐射树每一层总是会辐射成一个圈,即使是在数据很少的情况下,比如第二层只有4个节点,但是任然会呈一个圈状辐射出去,这样就浪费了页面布局,会显得很空旷。如果使用普通的radial布局,辐射方向是随意的,当我想要从顶至下,范围为0-180°的一个半圆形布局时无法实现

What does the proposed API look like?

给radial的layout增加两个属性 (1)direction----方向 类似树图的几个方向的定义,比如从上至下辐射,从左至右辐射等 (2)angle-----角度 把辐射限定在一个范围内,参数类型为Array,包括开始角度和结束角度,如果范围较小而数据过多会发生重叠,可以nodeSize进行碰撞检测失效,提供此辐射方向下比较合适的辐射角度

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help. 这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests