small components update

This commit is contained in:
Syasya 2025-08-13 12:31:07 +08:00
parent e47951fb7e
commit 37abbde5a1
3 changed files with 3 additions and 6 deletions

View File

@ -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(

View File

@ -127,10 +127,7 @@ const generationColor = isDark ? '#fcd913' : '#669bbc';
if (loading || !siteId || chartData.length === 0) {
return (
<div className="bg-white p-3 rounded-lg shadow-md dark:bg-rtgray-800 dark:text-white-light">
<div className="flex justify-between items-center mb-2">
<h2 className="text-lg font-bold">Monthly Energy Yield</h2>
</div>
<div className="h-96 w-full flex items-center justify-center">
<div className="h-[200px] w-full flex items-center justify-center">
<p className="text-white/70">
{loading ? 'Loading data...' : 'No data available for chart.'}
</p>

View File

@ -37,7 +37,7 @@ export default function KpiBottom({
</div>
</Panel>
<Panel title="Monthly Yield">
<Panel title="Yield Bar Chart">
<div className="w-full h-48">
{middle}
</div>