Skip to content

Commit

Permalink
fix: label formatter callback params
Browse files Browse the repository at this point in the history
  • Loading branch information
pepper-nice committed May 19, 2023
1 parent af6e892 commit c15b05c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit c15b05c

Please sign in to comment.