apache / apache/echarts

[Bug] rich align not work

Open
#19,740 4 comments 0 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.5.0

### Link to Minimal Reproduction

option = { title: { text: 'Referer of a Website', subtext: 'Fake Data', left: 'center' }, tooltip: { trigger: 'item' }, textStyle: { rich: { orgname: { fontSize: 12, width: 100, align:'right' }, count: { fontSize: 12, verticalAlign: 'top', align: 'center', color: '#597FF3', padding: [0, 0, 0, 15], } } }, legend: { orient: 'vertical', left: 'left', formatter:(name) => { const arr = [ `{orgname|${name}}`, `{count|100}`, ]; return arr.join(''); } }, series: [ { name: 'Access From', type: 'pie', radius: '50%', data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' }, { value: 580, name: 'Email' }, { value: 484, name: 'Union Ads' }, { value: 300, name: 'Video Ads' } ], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ] };

### Steps to Reproduce

Just run it directly

### Current Behavior

![7baf8bc083da3bd1212ffccc8b33afd](https://github.com/apache/echarts/assets/23545051/eef61fe7-8e3e-4042-b2fa-563148ca8caf)

### Expected Behavior

Display text to the right

### Environment

```markdown
- OS:
- Browser:
- Framework:
```

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.