Skip to content

docs: fix label callback type signatures inconsistency in axis docs#7283

Merged
moayuisuda merged 1 commit intov5from
copilot/update-document-7268
Mar 27, 2026
Merged

docs: fix label callback type signatures inconsistency in axis docs#7283
moayuisuda merged 1 commit intov5from
copilot/update-document-7268

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

PR #7268 aligned computeLabelsBBox to pass the full labels array as the third argument to label style callbacks — matching the render phase behavior. The docs had a leftover inconsistency: labelFormatter and labelRender showed (datum, index, array) while every other label style property (labelFontSize, labelFill, etc.) used (datum, index, data).

Changes

  • axis.en.md / axis.zh.md: Normalize labelFormatter and labelRender type signatures from (datum, index, array) => string(datum, index, data) => string

All label style callbacks now consistently accept:

(datum: string, index: number, data: string[]) => T

@moayuisuda moayuisuda marked this pull request as ready for review March 27, 2026 08:09
@moayuisuda moayuisuda merged commit 7a06423 into v5 Mar 27, 2026
4 checks passed
@moayuisuda moayuisuda deleted the copilot/update-document-7268 branch March 27, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants