From c15b05c5a73d326cfeb4bb10bcd5c43decccfc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=9D=E5=93=B2?= Date: Fri, 19 May 2023 15:00:44 +0800 Subject: [PATCH] fix: label formatter callback params --- src/runtime/plot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/plot.ts b/src/runtime/plot.ts index 7191083c0d..bbf145a649 100644 --- a/src/runtime/plot.ts +++ b/src/runtime/plot.ts @@ -1082,7 +1082,7 @@ function createLabelShapeFunction( ); const { shape = defaultLabelShape, text, ...style } = visualOptions; const f = typeof formatter === 'string' ? format(formatter) : formatter; - const value = { ...style, text: f(text) }; + const value = { ...style, text: f(text, datum, index, abstractData) }; const shapeFunction = useShape({ type: `label.${shape}`, ...style }); return shapeFunction(points, value, coordinate, theme, point2d); };