Merge branch '757-fullscale-chart-system-final-fix-dev' into 'develop'

757 fullscale chart system final fix dev

See merge request !582
This commit is contained in:
vgilc 2017-06-13 10:07:24 +02:00
commit a690187365
1 changed files with 19 additions and 20 deletions

View File

@ -256,7 +256,7 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
for ($i = 0; $i <= $resolution; $i++) {
$timestamp = $datelimit + ($interval * $i);
if ($fullscale) {
if ($fullscale && $resolution > 250) {
$timestamp = $data[$i]['utimestamp'];
}
@ -267,7 +267,6 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
$interval_min = false;
$interval_max = false;
if (!$fullscale) {
while (isset ($data[$data_i]) && $data[$data_i]['utimestamp'] >= $timestamp && $data[$data_i]['utimestamp'] < ($timestamp + $interval)) {
if ($interval_min === false) {
$interval_min = $data[$data_i]['datos'];
@ -282,12 +281,12 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
else if ($data[$data_i]['datos'] < $interval_min) {
$interval_min = $data[$data_i]['datos'];
}
$total += $data[$data_i]['datos'];
$last_known = $data[$data_i]['datos'];
$count++;
$data_i++;
}
}
if ($max_value < $interval_max) {
$max_value = $interval_max;