Merge branch '2423-Se_toman_como_data_las_graficas_boleanas' into 'develop'
fixed error in zoom graphs boolean See merge request artica/pandorafms!1572
This commit is contained in:
commit
35d9082a1c
|
@ -3093,7 +3093,7 @@ function series_type_graph_array($data, $show_elements_graph){
|
||||||
elseif(strpos($key, 'sum') !== false || strpos($key, 'baseline') !== false){
|
elseif(strpos($key, 'sum') !== false || strpos($key, 'baseline') !== false){
|
||||||
switch ($value['id_module_type']) {
|
switch ($value['id_module_type']) {
|
||||||
case 21: case 2: case 6:
|
case 21: case 2: case 6:
|
||||||
case 18: case 9: case 31:
|
case 18: case 9: case 31: case 100:
|
||||||
$data_return['series_type'][$key] = 'boolean';
|
$data_return['series_type'][$key] = 'boolean';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -271,17 +271,38 @@ function grafico_modulo_sparse_data_chart (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$data = db_get_all_rows_filter (
|
if($data_module_graph['id_module_type'] == 2 ||
|
||||||
'tagente_datos',
|
$data_module_graph['id_module_type'] == 6 ||
|
||||||
array ('id_agente_modulo' => (int)$agent_module_id,
|
$data_module_graph['id_module_type'] == 21 ||
|
||||||
"utimestamp > '". $date_array['start_date']. "'",
|
$data_module_graph['id_module_type'] == 18 ||
|
||||||
"utimestamp < '". $date_array['final_date'] . "'",
|
$data_module_graph['id_module_type'] == 9 ||
|
||||||
'group' => "ROUND(utimestamp / $data_slice)",
|
$data_module_graph['id_module_type'] == 31 ||
|
||||||
'order' => 'utimestamp ASC'),
|
$data_module_graph['id_module_type'] == 100){
|
||||||
array ('sum(datos)/count(datos) as datos', 'min(utimestamp) as utimestamp'),
|
$data = db_get_all_rows_filter (
|
||||||
'AND',
|
'tagente_datos',
|
||||||
$data_module_graph['history_db']
|
array ('id_agente_modulo' => (int)$agent_module_id,
|
||||||
);
|
"utimestamp > '". $date_array['start_date']. "'",
|
||||||
|
"utimestamp < '". $date_array['final_date'] . "'",
|
||||||
|
'group' => "ROUND(utimestamp / $data_slice)",
|
||||||
|
'order' => 'utimestamp ASC'),
|
||||||
|
array ('ROUND(sum(datos)/count(datos)) as datos', 'min(utimestamp) as utimestamp'),
|
||||||
|
'AND',
|
||||||
|
$data_module_graph['history_db']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$data = db_get_all_rows_filter (
|
||||||
|
'tagente_datos',
|
||||||
|
array ('id_agente_modulo' => (int)$agent_module_id,
|
||||||
|
"utimestamp > '". $date_array['start_date']. "'",
|
||||||
|
"utimestamp < '". $date_array['final_date'] . "'",
|
||||||
|
'group' => "ROUND(utimestamp / $data_slice)",
|
||||||
|
'order' => 'utimestamp ASC'),
|
||||||
|
array ('sum(datos)/count(datos) as datos', 'min(utimestamp) as utimestamp'),
|
||||||
|
'AND',
|
||||||
|
$data_module_graph['history_db']
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue