Changed logic in hourly page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Larastan / larastan (pull_request) Failing after 4m58s
Laravel Pint / pint (pull_request) Successful in 2m58s

This commit is contained in:
dhanabalan
2026-10-15 11:14:20 +05:30
parent 8ffbaf3742
commit 387f31223b

View File

@@ -140,14 +140,15 @@ class ItemOverview extends ChartWidget
}, $shiftedKeys); }, $shiftedKeys);
} }
$planData = []; $totalQuantity = array_sum($orderedData);
$cumulativeQuantity = 0;
foreach ($orderedData as $quantity) { $planQuantity = round($totalQuantity / 22.5, 2);
$cumulativeQuantity += $quantity;
$planData[] = round($cumulativeQuantity / 22.5, 2); $planData = array_fill(
} 0,
count($orderedData),
$planQuantity
);
return [ return [
'datasets' => [ 'datasets' => [