G6 icon indicating copy to clipboard operation
G6 copied to clipboard

Adjustment of pipes doesn't work.

Open mostopalove opened this issue 2 years ago • 5 comments

问题描述

There is no way to automatically align pipes. Determining the starting position does not solve the problem in case of dynamic pipe resizing. If the content of the graph changes, this causes an overlap. (adding new nodes or changing a layer)

The issue was previously described in this issue. its solution does not exist.

重现链接

https://codepen.io/mostopalove/pen/yLzRJKK

重现步骤

  1. Go to the site with a live example.
  2. Look at the result.

预期行为

As a user, I expect different chart layouts to be separate from each other. But they overlap.

平台

  • 操作系统: [macOS]
  • 网页浏览器: [Google Chrome]
  • G6 版本: [4.3.11 ]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

mostopalove avatar Apr 16 '22 12:04 mostopalove

Hi, sorry for replying late, so busy recently. Please try the new layout 'comboCombined' to see if it meets your requirements: https://codepen.io/Yanyan-Wang/pen/QWQjbpv

The inner and outer layouts could be assign to any other layout algorithms in G6.

P.S. please upgrade the @antv/g6 and @antv/layout to the latest version.

Yanyan-Wang avatar May 05 '22 14:05 Yanyan-Wang

@Yanyan-Wang Thank you! This is REALLY cool feature! I will work right now with this and will write here in the comments all the problems or incomprehensible moments.

  1. From your example, how to understand where is this comboPadding: 30?
Снимок экрана 2022-05-14 в 17 39 28
  1. Can I define own layout for each combo? (In my case I want to change nodes and layout into combo by click, something like collapse-expand but short/full info about nodes)

  2. I saw that in your example collapse-expand functionality doesn't work, but I add it manually. Is it possible to redraw innerLayout when combo size changed? After collapse for example? You check see code here: https://codepen.io/mostopalove/pen/RwQoMem

mostopalove avatar May 14 '22 15:05 mostopalove

@Yanyan-Wang Hello! Do you know how to solve the issue?

mostopalove avatar Jun 04 '22 12:06 mostopalove

@Yanyan-Wang Hey! Are you here? Help me please or answer something

mostopalove avatar Jun 24 '22 16:06 mostopalove

  1. about comboPadding: 30

the comboPadding means the padding space inside the combo, from the content to the border image

  1. Can I define own layout for each combo? (In my case I want to change nodes and layout into combo by click, something like collapse-expand but short/full info about nodes)

Did not support that yet. But I think you just want to add some information for collapsed combo? Maybe just update the combo label after combo collapsed. Or see the new feature to add a image for a collapsed combo: https://g6.antv.vision/en/examples/net/comboLayout#comboCombined

  1. Can I define own layout for each combo? (In my case I want to change nodes and layout into combo by click, something like collapse-expand but short/full info about nodes)

collapse-expand is a behavior for TreeGraph. There is another behavior for collapsing/expanding combo named collapse-expand-combo, see docs here: https://g6.antv.vision/en/docs/manual/middle/states/defaultBehavior#collapse-expand-combo

Yanyan-Wang avatar Jul 29 '22 03:07 Yanyan-Wang

Hi, dear user. Since there was no response for a long time, we cannot figure out the answer of the problem you described. If there is new progress, feel free to open a new issue.

Yanyan-Wang avatar Nov 29 '22 09:11 Yanyan-Wang