Merge pull request 'Changed logic in hourly page' (#1251) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #1251
This commit was merged in pull request #1251.
This commit is contained in:
@@ -140,14 +140,15 @@ class ItemOverview extends ChartWidget
|
||||
}, $shiftedKeys);
|
||||
}
|
||||
|
||||
$planData = [];
|
||||
$cumulativeQuantity = 0;
|
||||
$totalQuantity = array_sum($orderedData);
|
||||
|
||||
foreach ($orderedData as $quantity) {
|
||||
$cumulativeQuantity += $quantity;
|
||||
$planQuantity = round($totalQuantity / 22.5, 2);
|
||||
|
||||
$planData[] = round($cumulativeQuantity / 22.5, 2);
|
||||
}
|
||||
$planData = array_fill(
|
||||
0,
|
||||
count($orderedData),
|
||||
$planQuantity
|
||||
);
|
||||
|
||||
return [
|
||||
'datasets' => [
|
||||
|
||||
Reference in New Issue
Block a user