Skip to content

fix(#575): Type Recharts formatter/label props in chart components (remove any)#636

Merged
llinsss merged 2 commits into
DogStark:mainfrom
Inkman007:fix/575-chart-formatter-types
Jun 25, 2026
Merged

fix(#575): Type Recharts formatter/label props in chart components (remove any)#636
llinsss merged 2 commits into
DogStark:mainfrom
Inkman007:fix/575-chart-formatter-types

Conversation

@Inkman007

Copy link
Copy Markdown
Contributor

Summary

  • FinancialReportChart: Tooltip formatter callback value typed as number | string instead of any — matches the actual values Recharts passes and what Number(value) expects
  • PetHealthChart: Introduces a local PieLabelProps interface for the fields used in renderCustomizedLabel (cx, cy, midAngle, innerRadius, outerRadius, percent) — removes both the any parameter and the eslint-disable-next-line comment that was suppressing the warning

Changes

  • src/components/analytics/FinancialReportChart.tsx(value: any)(value: number | string)
  • src/components/analytics/PetHealthChart.tsxPieLabelProps interface added, (props: any) removed, eslint-disable comment removed

Test plan

  • Financial chart renders and tooltip shows correctly formatted $ values
  • Pet health pie chart renders with percentage labels inside slices
  • tsc --noEmit passes with no errors on both modified files

Closes #575

Types the Tooltip formatter value as number|string in FinancialReportChart
and introduces a PieLabelProps interface for the renderCustomizedLabel
callback in PetHealthChart, removing both any usages and the eslint-disable
comment that was suppressing the original warning.
@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@Inkman007 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@llinsss llinsss merged commit a884ec1 into DogStark:main Jun 25, 2026
2 of 9 checks passed
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.

[Frontend] Type Chart Formatter Props in FinancialReportChart and PetHealthChart (Remove any)

2 participants