Changed logic in hourly page #1251
@@ -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' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user