antvis / antvis/G2Plot

🐛 [BUG] Column / WordCloud 的 legend.title.style.textAlign 无法右对齐

Open
#3,306 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Bug description [Please make everyone to understand it]

设置 legend.title.style.textAlign = 'right' 时无法右对齐


https://codesandbox.io/s/charming-firefly-6mdf95
https://codesandbox.io/s/relaxed-hodgkin-incgf6

### 🏞 Expected result
![image](https://user-images.githubusercontent.com/9134671/182917132-e6111d16-ca5e-4c97-acdf-2bfb6cd4aabb.png)

* **G2Plot Version**: 2.4.20

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the alignment problem in the two linked CodeSandbox examples with G2Plot 2.4.20, focusing on Column and WordCloud legends. Trace how legend.title.style.textAlign is handled for these charts and compare the result with the expected screenshot. Done means setting textAlign to "right" visibly right-aligns the legend title in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.