plainheart commented on code in PR #21220:
URL: https://github.com/apache/echarts/pull/21220#discussion_r2622525473


##########
src/coord/axisTickLabelBuilder.ts:
##########
@@ -132,8 +132,10 @@ export function createAxisLabels(axis: Axis, ctx: 
AxisLabelsComputingContext): {
         return {
             labels: zrUtil.map(ticks, numval => {
                 const tick = {value: numval};
+                const index = ticks.indexOf(numval);

Review Comment:
   @Ovilia Currently, using `indexOf` to retrieve the tick index is not 
necessary and may lead to a performance issue. The index can be obtained from 
the second callback parameter of `zrUtil.map`.
   
   ```js
   zrUtil.map(ticks, (numval, index) => {})
   ``` 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to