antvis / antvis/G2Plot

🤔 [QUESTION]图例legend的marker和文本有没有可控制居中对齐的?marker和文本底对齐不好看呐~

Open
#2,990 0 comments 1 reaction 0 assignees View on GitHub
Question
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 图例legend的marker和文本有没有可控制居中对齐的?marker和文本底对齐不好看呐~

### 💻 Link to minimal reproduction

我看了marker和label的所有配置项,style的样式配置里,都没有offsetX、offsetY属性,legend.label.style.textBaseline配置middle也无效,这个细节问题有没有其他办法解决?自定义配置marker也还是不能对齐,自己写HTML的图例,又没有交互了~,这个问题有解决了的没~

### 🏞 Expected result

### 🚑 Any additional [like screenshots]

* **G2Plot Version**:
* **Platform**:

Contributor guide

Open the contributing guide

Research direction

No file, test, G2Plot version, or platform is named. Start by reproducing the legend marker and label alignment with the reported configuration options, including textBaseline and custom markers. Done means identifying a supported way to center them while preserving legend interaction, or documenting that it is not supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.