Changed logic in hourly count #1249
@@ -140,10 +140,9 @@ class ItemOverview extends ChartWidget
|
|||||||
}, $shiftedKeys);
|
}, $shiftedKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
$planData = array_map(
|
$totalQuantity = array_sum($orderedData);
|
||||||
fn ($quantity) => round($quantity / 22.5, 2),
|
|
||||||
$orderedData
|
$planQuantity = round($totalQuantity / 22.5, 2);
|
||||||
);
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'datasets' => [
|
'datasets' => [
|
||||||
@@ -172,7 +171,7 @@ class ItemOverview extends ChartWidget
|
|||||||
'yesterday' => $isFgLine ? "Yesterday's FG Count" : "Yesterday's Hourly Production",
|
'yesterday' => $isFgLine ? "Yesterday's FG Count" : "Yesterday's Hourly Production",
|
||||||
default => $isFgLine ? "Today's FG Count" : "Today's Hourly Production",
|
default => $isFgLine ? "Today's FG Count" : "Today's Hourly Production",
|
||||||
},
|
},
|
||||||
'data' => $planData,
|
'data' => $planQuantity,
|
||||||
'borderColor' => 'rgba(255, 99, 132, 1)',
|
'borderColor' => 'rgba(255, 99, 132, 1)',
|
||||||
'backgroundColor' => 'rgba(75, 192, 192, 0.2)',
|
'backgroundColor' => 'rgba(75, 192, 192, 0.2)',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
|
|||||||
Reference in New Issue
Block a user