add graph info
This commit is contained in:
parent
e6a88c4d99
commit
ba8ad57a3c
|
@ -37,9 +37,15 @@ class MonitoringApiController extends AbstractController
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($entities as $entity) {
|
foreach ($entities as $entity) {
|
||||||
|
$hour = (int) $entity->getDate()->format('H');
|
||||||
$labels[] = $entity->getDate()->format('H:i');
|
$labels[] = $entity->getDate()->format('H:i');
|
||||||
$line['data'][] = $entity->getValue();
|
$line['data'][] = $entity->getValue();
|
||||||
$line2['data'][] = 27;
|
|
||||||
|
if ($hour >= 20 || $hour <= 10) {
|
||||||
|
$line2['data'][] = 23;
|
||||||
|
} else {
|
||||||
|
$line2['data'][] = 27;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$datasets[] = $line;
|
$datasets[] = $line;
|
||||||
|
|
Loading…
Reference in a new issue