From 37abbde5a1cd7ab7866daaec285dc6a2e447385d Mon Sep 17 00:00:00 2001 From: Syasya Date: Wed, 13 Aug 2025 12:31:07 +0800 Subject: [PATCH] small components update --- components/dashboards/EnergyLineChart.tsx | 2 +- components/dashboards/MonthlyBarChart.tsx | 5 +---- components/dashboards/kpibottom.tsx | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/components/dashboards/EnergyLineChart.tsx b/components/dashboards/EnergyLineChart.tsx index c523e6b..7446d33 100644 --- a/components/dashboards/EnergyLineChart.tsx +++ b/components/dashboards/EnergyLineChart.tsx @@ -140,7 +140,7 @@ const EnergyLineChart = ({ siteId }: EnergyLineChartProps) => { setGeneration(res.generation); // ⬇️ ADD THIS here — fetch forecast - const forecastData = await fetchForecast(3.15, 101.7, 37, 0, 5.67); + const forecastData = await fetchForecast(3.15, 101.7, 37, 0, 20.67); const selectedDateStr = selectedDate.toISOString().split('T')[0]; setForecast( diff --git a/components/dashboards/MonthlyBarChart.tsx b/components/dashboards/MonthlyBarChart.tsx index c76262f..d68df4a 100644 --- a/components/dashboards/MonthlyBarChart.tsx +++ b/components/dashboards/MonthlyBarChart.tsx @@ -127,10 +127,7 @@ const generationColor = isDark ? '#fcd913' : '#669bbc'; if (loading || !siteId || chartData.length === 0) { return (
-
-

Monthly Energy Yield

-
-
+

{loading ? 'Loading data...' : 'No data available for chart.'}

diff --git a/components/dashboards/kpibottom.tsx b/components/dashboards/kpibottom.tsx index 3cbc952..d43553b 100644 --- a/components/dashboards/kpibottom.tsx +++ b/components/dashboards/kpibottom.tsx @@ -37,7 +37,7 @@ export default function KpiBottom({
- +
{middle}