apache / apache/echarts

[Bug] axisTick.customValues和axisLabel.formatter冲突

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

Description

### Version

5.5.1

### Link to Minimal Reproduction

### Steps to Reproduce

1、建立图表
2、配置axisTick.customValues
`
axisTick: {
alignWithLabel: true,
customValues: [10, 100, 1000, 10000, 100000, 1000000]
},
`
![1731312507168](https://github.com/user-attachments/assets/693abe99-52da-4dd9-856b-bf4e1787fc87)

3、配置axisLabel.formatter
`
axisLabel: {
showMinLabel: true,
showMaxLabel: true,
formatter: function (value) {
return Number(value).toExponential(0)
}
},
`
![1731312540167](https://github.com/user-attachments/assets/215068fa-5a48-4a1c-b17b-487a9bf9af46)

### Current Behavior

未设置axisLabel.formatter之前,可以根据axisTick.customValues设置的值进行展示,设置了axisLabel.formatter,无法根据根据axisTick.customValues设置的值进行展示

### Expected Behavior

无论是否设置axisLabel.formatter,都根据axisTick.customValues设置的值进行展示

### Environment

```markdown
- OS: win10
- Browser: chrome 130.0.6723.92
- 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.