Skip to content

fix(types): make grid.tickWidth Scriptable - #12322

Closed
Yahiro025 wants to merge 1 commit into
chartjs:masterfrom
Yahiro025:fix/types-tickwidth-scriptable-12320
Closed

Yahiro025 wants to merge 1 commit into
chartjs:masterfrom
Yahiro025:fix/types-tickwidth-scriptable-12320

Conversation

@Yahiro025

Copy link
Copy Markdown

Fixes

Fixes #12320

Summary

grid.tickWidth is scriptable at runtime and documented as scriptable in docs/axes/styling.md, but GridLineOptions.tickWidth was typed as a plain number. That made TypeScript reject valid scriptable callbacks.

This updates the type to Scriptable<number, ScriptableScaleContext>, matching neighboring tick options such as tickBorderDash / tickBorderDashOffset / tickColor.

Changes

  • src/types/index.d.ts: GridLineOptions.tickWidth → Scriptable<number, ScriptableScaleContext>

No runtime behavior changes.

Test plan

  • Confirmed docs mark tickWidth as scriptable
  • Confirmed runtime already accepts a function (per issue report)
  • Type-only change; neighboring options use the same Scriptable<..., ScriptableScaleContext> pattern

@Yahiro025

Copy link
Copy Markdown
Author

Closing in favor of the earlier open PR #12321, which already fixes #12320 (and covers indexable tickWidth plus type regression tests). Sorry for the duplicate.

@Yahiro025 Yahiro025 closed this Sep 27, 2026
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.

Minor type definition issue with tickWidth in index.d.ts - should be Scriptable<number, ScriptableScaleContext>

1 participant