pissang commented on code in PR #17426:
URL: https://github.com/apache/echarts/pull/17426#discussion_r946388217


##########
src/component/axis/AxisBuilder.ts:
##########
@@ -269,18 +269,22 @@ const builders: Record<'axisLine' | 'axisTickLabel' | 
'axisName', AxisElementsBu
         );
 
         const line = new graphic.Line({
-            shape: {
-                x1: pt1[0],
-                y1: pt1[1],
-                x2: pt2[0],
-                y2: pt2[1]
-            },
+            shape: graphic.subPixelOptimizeLine({
+                shape: {
+                    x1: pt1[0],
+                    y1: pt1[1],
+                    x2: pt2[0],
+                    y2: pt2[1]
+                },
+                style: {
+                    lineWidth: lineStyle.lineWidth
+                }
+            }).shape,
             style: lineStyle,
             strokeContainThreshold: opt.strokeContainThreshold || 5,
             silent: true,
             z2: 1
         });
-        graphic.setSubPixelOptimizeLine(line);
         line.anid = 'line';

Review Comment:
   I think we can use `graphic.subPixelOptimizeLine(line)` directly here.



-- 
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: commits-unsubscr...@echarts.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to