antvis/G6






The issue has been closed
边文字旋转问题 #4515
auuunya posted onGitHub
Describe the bug
let radian = Math.atan((startPoint.y - endPoint.y) / ((startPoint.x - endPoint.x)));
startLabel.rotateAtStart(radian);
根据这个斜率方法设置自定义边上的文字旋转,文字在边的中点做自我旋转
Your Example Website or App
rt
Steps to Reproduce the Bug or Issue
rt.
Expected behavior
rt.
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response