chaged logic in hourly count
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 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m57s
Laravel Larastan / larastan (pull_request) Failing after 5m51s
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 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m57s
Laravel Larastan / larastan (pull_request) Failing after 5m51s
This commit is contained in:
@@ -140,9 +140,14 @@ class ItemOverview extends ChartWidget
|
||||
}, $shiftedKeys);
|
||||
}
|
||||
|
||||
$totalQuantity = array_sum($orderedData);
|
||||
$planData = [];
|
||||
$cumulativeQuantity = 0;
|
||||
|
||||
$planQuantity = round($totalQuantity / 22.5, 2);
|
||||
foreach ($orderedData as $quantity) {
|
||||
$cumulativeQuantity += $quantity;
|
||||
|
||||
$planData[] = round($cumulativeQuantity / 22.5, 2);
|
||||
}
|
||||
|
||||
return [
|
||||
'datasets' => [
|
||||
@@ -171,7 +176,7 @@ class ItemOverview extends ChartWidget
|
||||
'yesterday' => $isFgLine ? "Yesterday's FG Count" : "Yesterday's Hourly Production",
|
||||
default => $isFgLine ? "Today's FG Count" : "Today's Hourly Production",
|
||||
},
|
||||
'data' => $planQuantity,
|
||||
'data' => $planData,
|
||||
'borderColor' => 'rgba(255, 99, 132, 1)',
|
||||
'backgroundColor' => 'rgba(75, 192, 192, 0.2)',
|
||||
'fill' => false,
|
||||
|
||||
Reference in New Issue
Block a user