|
|
@ -51,14 +51,18 @@ class ChartTemperatureCommand extends ContainerAwareCommand |
|
|
|
|
|
|
|
$perfect = (int) $this->params->get('temperature_trigger_max'); |
|
|
|
$min = (int) $this->params->get('temperature_trigger_min'); |
|
|
|
|
|
|
|
$stats = ['Value,Perfect,Min']; |
|
|
|
$xtics = []; |
|
|
|
|
|
|
|
foreach ($entities as $i => $entity) { |
|
|
|
$stats1[] = $entity->getvalue(); |
|
|
|
$stats2[] = (float) 27; |
|
|
|
$stats3[] = (float) $min; |
|
|
|
|
|
|
|
if ($i % 5 === 0) { |
|
|
|
$xtics[] = sprintf('"%s" %d', $entity->getDate()->format('H:i'), $i); |
|
|
|
} |
|
|
|
|
|
|
|
$table->addRow([ |
|
|
|
$i, |
|
|
|
$entity->getDate()->format('d/m/Y H:i'), |
|
|
@ -77,6 +81,8 @@ class ChartTemperatureCommand extends ContainerAwareCommand |
|
|
|
$process = new Process([ |
|
|
|
'./lib/eplot/eplot', |
|
|
|
'-d', |
|
|
|
'--xtics', |
|
|
|
sprintf('(%s)', implode(', ', $xtics)), |
|
|
|
'-r', |
|
|
|
'[0:45][10:35]', |
|
|
|
'-t', |
|
|
|