echarts
echarts copied to clipboard
[Bug] axisLabel precision causes floating-point error in number formatting (toFixed)
Version
5.6.0
Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=bar-simple&lang=ts&code=PYBwLglsB2AEC8sDeAoWsDmAnCATAXMmurADYCmAZmIQMwAM9ANMQL4voAeAgpxAM6FUJWGACeIcoQDkAYwCGYchmBYx0jiVyL5hANrSAsjA2xpAFQCu5U9IDq5XLfMALS7YBiOaQF02msV4BIWJ0cUkZADd5UmsNUNgIaCUsaNJCegA6egA2AHZ6AFY8gCYATgBGHOqavM10AFt5TkJYLIraABYKis7CgA5aIeGu-tgGpMIAWiyS-h68iv68wsY1-bH-EFIIMAA5SwaAI3IsQkL_Yn5TiHJBWD0E4RFYbTBdB4SRLNyizpz-n0xt9smUSv0mLAviQfowynkcoUcpDoegfiVaP0yiiXjDsrkMf1UbAfMDRBIpGYjvIsNIEqxiH5WABuIA
Steps to Reproduce
see Link to Minimal Reproduction
Current Behavior
the axis label formatting via (+x).toFixed(precision) in src/util/number.ts (line 146) produces floating-point errors.
Expected Behavior
axis label value should be increased by interval
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response