You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When setting autoRotate: false for edge labels, the labels should remain horizontal instead of following the edge path. However, the labels still follow the edge direction instead of staying upright.
Expected Behavior
The label should always remain horizontal, regardless of the edge's angle.
Current Behavior
Even when autoRotate: false, the label follows the edge path's orientation.
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
edge: { type: 'line', style: { badgeText: (edge: any) => edge.edgeBadgeText, lineWidth: (edge: any) => edge.edgeWidth, badgeWordWrap: true, autoRotate: false, stroke: '#7c7c7c', border: '1px solid #bdbdbd', badgeTextBaseline: 'middle', badgeFontSize: 10, badgeFill: '#727272', badgeBackground: true, badgeBackgroundFill: '#fdfdfd', badgeBackgroundFillOpacity: 1, badgeBackgroundRadius: 5, }, },
Observe that the label still follows the edge's direction instead of staying horizontal.
Version / 版本
🆕 5.x
OS / 操作系统
macOS
Windows
Linux
Others / 其他
Browser / 浏览器
Chrome
Edge
Firefox
Safari (Limited support / 有限支持)
IE (Nonsupport / 不支持)
Others / 其他
The text was updated successfully, but these errors were encountered:
It seems that you are experiencing an issue with the autoRotate property for edge labels in antvis/G6 version 5.x. When autoRotate is set to false, the labels are expected to remain horizontal, but they are still following the edge's direction.
Here's a quick checklist to ensure everything is set up correctly:
Configuration Check: Ensure that the labelCfg is correctly applied to the edge configuration. Double-check the syntax and ensure there are no typos.
Version Compatibility: Make sure you are using the latest version of G6, as there might be updates or bug fixes related to this issue.
Custom Rendering: If the default behavior is not as expected, consider implementing a custom label rendering function to control the label's orientation manually.
If you've verified these and the issue persists, it might be a bug. Unfortunately, I can't create an issue directly, but you can report this on the antvis/G6 GitHub repository if it's not already reported.
If you need further assistance or have additional questions, feel free to ask!
🪧 Tips
For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.
Thank you for reporting this. Have you tried "labelAutoRotate"? It may fix the issue of the label not staying horizontal when autoRotate: false. If it doesn't work, let us know.
Describe the bug / 问题描述
Description
When setting autoRotate: false for edge labels, the labels should remain horizontal instead of following the edge path. However, the labels still follow the edge direction instead of staying upright.
Expected Behavior
The label should always remain horizontal, regardless of the edge's angle.
Current Behavior
Even when autoRotate: false, the label follows the edge path's orientation.
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
edge: { type: 'line', style: { badgeText: (edge: any) => edge.edgeBadgeText, lineWidth: (edge: any) => edge.edgeWidth, badgeWordWrap: true, autoRotate: false, stroke: '#7c7c7c', border: '1px solid #bdbdbd', badgeTextBaseline: 'middle', badgeFontSize: 10, badgeFill: '#727272', badgeBackground: true, badgeBackgroundFill: '#fdfdfd', badgeBackgroundFillOpacity: 1, badgeBackgroundRadius: 5, }, },
Observe that the label still follows the edge's direction instead of staying horizontal.
Version / 版本
🆕 5.x
OS / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: