Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mchvip opened this issue Nov 11, 2024 · 1 comment
Open

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

mchvip opened this issue Nov 11, 2024 · 1 comment
Labels
bug pending We are not sure about whether this is a bug/new feature.

Comments

@mchvip
Copy link

mchvip commented Nov 11, 2024

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

3、配置axisLabel.formatter
axisLabel: { showMinLabel: true, showMaxLabel: true, formatter: function (value) { return Number(value).toExponential(0) } },
1731312540167

Current Behavior

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

Expected Behavior

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

Environment

- OS: win10
- Browser: chrome 130.0.6723.92
- Framework:

Any additional comments?

No response

@mchvip mchvip added the bug label Nov 11, 2024
@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Nov 11, 2024
Copy link

echarts-bot bot commented Nov 11, 2024

@mchvip It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] conflict between axisTick.customValues ​​and axisLabel.formatter

BODY

Version

5.5.1

Link to Minimal Reproduction

none

Steps to Reproduce

  1. Create a chart

  2. Configure axisTick.customValues
    axisTick: { alignWithLabel: true, customValues: [10, 100, 1000, 10000, 100000, 1000000] },
    1731312507168

  3. Configure axisLabel.formatter
    axisLabel: { showMinLabel: true, showMaxLabel: true, formatter: function (value) { return Number(value).toExponential(0) } },
    1731312540167

Current Behavior

Before axisLabel.formatter is set, the display can be based on the value set by axisTick.customValues. After axisLabel.formatter is set, the display cannot be based on the value set by axisTick.customValues.

Expected Behavior

Regardless of whether axisLabel.formatter is set, it will be displayed based on the value set by axisTick.customValues.

Environment

- OS: win10
- Browser: chrome 130.0.6723.92
- Framework:

Any additional comments?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

1 participant