This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch fix-axisTickLabel
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 921496a2e80d30fd2ebc0b194a4acefaea8ba149
Author: Ovilia <[email protected]>
AuthorDate: Thu Dec 18 10:33:22 2025 +0800

    fix(axis): refactor axisLabel formatter
    
    https://github.com/apache/echarts/pull/21220/changes#r2622525473
---
 src/coord/axisTickLabelBuilder.ts | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/coord/axisTickLabelBuilder.ts 
b/src/coord/axisTickLabelBuilder.ts
index a6166d3d6..ab344dec6 100644
--- a/src/coord/axisTickLabelBuilder.ts
+++ b/src/coord/axisTickLabelBuilder.ts
@@ -130,10 +130,8 @@ export function createAxisLabels(axis: Axis, ctx: 
AxisLabelsComputingContext): {
         const tickNumbers = tickValuesToNumbers(axis, custom);
         const ticks = zrUtil.filter(tickNumbers, val => val >= extent[0] && 
val <= extent[1]);
         return {
-            labels: zrUtil.map(ticks, numval => {
+            labels: zrUtil.map(ticks, (numval, index) => {
                 const tick = {value: numval};
-                const index = ticks.indexOf(numval);
-
                 return {
                     formattedLabel: labelFormatter(tick, index),
                     rawLabel: axis.scale.getLabel(tick),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to