antvis / G6

♾ A Graph Visualization Framework in JavaScript.
https://g6.antv.antgroup.com/
MIT License
11.16k stars 1.33k forks source link

How to customize the location of the label #6536

Closed werbug closed 2 days ago

werbug commented 4 days ago

Describe the bug / 问题描述

labelCfg中,position加offset只能单一改变x或者y方向的位置,如何能够同时更改label的x,y

Reproduction link / 重现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

4.x

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response

yvonneyx commented 2 days ago

4.0 内置 label 不支持同时更改 xy 需要自定义

werbug commented 2 days ago

ok