Skip to content

Fix Recharts Tooltip labelFormatter TypeScript error#66

Open
dnlweijers wants to merge 2 commits intogommzystudio:masterfrom
dnlweijers:fix/recharts-tooltip-types
Open

Fix Recharts Tooltip labelFormatter TypeScript error#66
dnlweijers wants to merge 2 commits intogommzystudio:masterfrom
dnlweijers:fix/recharts-tooltip-types

Conversation

@dnlweijers
Copy link

No description provided.

Copilot AI review requested due to automatic review settings January 28, 2026 13:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a TypeScript error in the Recharts Tooltip component's labelFormatter prop by replacing the typed parameter with runtime type checking. The change also reformats the chart component code with improved line breaks for better readability.

Changes:

  • Modified labelFormatter to use runtime type checking instead of a typed parameter to resolve TypeScript errors
  • Reformatted Tooltip and Line components to use multi-line formatting for improved code readability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div className="bg-white p-6 rounded-xl shadow-sm border border-gray-200 h-[300px]">
<h5 className="text-sm font-medium text-gray-500 mb-4">RTT History & Threshold</h5>
<ResponsiveContainer width="100%" height="100%">
<ResponsiveContainer width="100%" height="100%">
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ResponsiveContainer has inconsistent indentation. It should be indented at the same level as the h5 element above it (line 182), which uses 28 spaces (7 levels of 4-space indentation). Currently, it's using 32 spaces (8 levels), making it inconsistent with the surrounding code structure.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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