From 90b0a1bf34d5b6b71c0aa0ee16e31a16f05f8182 Mon Sep 17 00:00:00 2001 From: Zhongxiang Wang Date: Wed, 29 Apr 2026 20:01:05 +0800 Subject: [PATCH] fix(graphic): close path in `roundRect` helper to avoid stroke corner gap This fixes apache/echarts#21595 --- src/graphic/helper/roundRect.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/graphic/helper/roundRect.ts b/src/graphic/helper/roundRect.ts index db79d2c4c..0ee6e9d1b 100644 --- a/src/graphic/helper/roundRect.ts +++ b/src/graphic/helper/roundRect.ts @@ -84,4 +84,5 @@ export function buildPath(ctx: CanvasRenderingContext2D | PathProxy, shape: { r4 !== 0 && ctx.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI); ctx.lineTo(x, y + r1); r1 !== 0 && ctx.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5); + ctx.closePath(); }