fix: Render PORT binding and Recharts TypeScript errors

This commit is contained in:
ajaysi
2026-04-03 13:02:59 +05:30
parent 3f2d9104d9
commit 4fbbe9c8b4
10 changed files with 7210 additions and 3165 deletions

View File

@@ -156,11 +156,11 @@ export const TrendsChart: React.FC<TrendsChartProps> = ({
border: `1px solid ${theme.palette.divider}`,
borderRadius: '8px',
}}
formatter={(value: any, name: string) => {
formatter={(value: any, name: any) => {
if (typeof value === 'number') {
return [`${Math.round(value)}`, name];
return [`${Math.round(value)}`, String(name)];
}
return [value, name];
return [value, String(name)];
}}
labelFormatter={(label) => `Date: ${label}`}
/>

View File

@@ -418,7 +418,7 @@ const AdvancedCostAnalytics: React.FC<AdvancedCostAnalyticsProps> = ({
border: '1px solid rgba(255,255,255,0.1)',
borderRadius: 8
}}
formatter={(value: number) => [formatCurrency(value), 'Cost']}
formatter={(value: any) => [formatCurrency(Number(value) || 0), 'Cost']}
/>
<Bar dataKey="cost" fill="#667eea" radius={[4, 4, 0, 0]} />
</LazyBarChart>
@@ -478,7 +478,7 @@ const AdvancedCostAnalytics: React.FC<AdvancedCostAnalyticsProps> = ({
))}
</Pie>
<RechartsTooltip
formatter={(value: number) => formatCurrency(value)}
formatter={(value: any) => formatCurrency(Number(value) || 0)}
contentStyle={{
backgroundColor: 'rgba(0, 0, 0, 0.8)',
border: '1px solid rgba(255,255,255,0.1)',