Merge branch 'ent-11419-pequenos-cambios-en-widget-de-graficas-simples' into 'develop'
Ent 11419 Pequeños cambios en widget de graficas simples See merge request artica/pandorafms!6155
This commit is contained in:
commit
39edfa48df
|
@ -259,7 +259,7 @@ function flot_area_graph(
|
|||
|
||||
$return .= html_print_input_hidden(
|
||||
'line_width_graph',
|
||||
$config['custom_graph_width'],
|
||||
(empty($params['line_width']) === true) ? $config['custom_graph_width'] : $params['line_width'],
|
||||
true
|
||||
);
|
||||
$return .= "<div id='timestamp_$graph_id'
|
||||
|
|
|
@ -297,6 +297,14 @@ class BasicChart extends Widget
|
|||
$values['label'] = $decoder['label'];
|
||||
}
|
||||
|
||||
if (isset($decoder['type_graph']) === true) {
|
||||
$values['type_graph'] = $decoder['type_graph'];
|
||||
}
|
||||
|
||||
if (isset($decoder['line_width']) === true) {
|
||||
$values['line_width'] = $decoder['line_width'];
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
@ -477,6 +485,22 @@ class BasicChart extends Widget
|
|||
],
|
||||
];
|
||||
|
||||
$types_graph = [
|
||||
'area' => __('Area'),
|
||||
'line' => __('Wire'),
|
||||
];
|
||||
|
||||
$inputs['inputs']['row1'][] = [
|
||||
'label' => __('Type graph'),
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => $types_graph,
|
||||
'name' => 'type_graph',
|
||||
'selected' => $values['type_graph'],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Show Value'),
|
||||
'arguments' => [
|
||||
|
@ -520,6 +544,18 @@ class BasicChart extends Widget
|
|||
],
|
||||
];
|
||||
|
||||
$inputs['inputs']['row2'][] = [
|
||||
'label' => __('Graph line size'),
|
||||
'arguments' => [
|
||||
'name' => 'line_width',
|
||||
'type' => 'number',
|
||||
'value' => (empty($values['line_width']) === true) ? 3 : $values['line_width'],
|
||||
'return' => true,
|
||||
'min' => 2,
|
||||
'max' => 10,
|
||||
],
|
||||
];
|
||||
|
||||
return $inputs;
|
||||
}
|
||||
|
||||
|
@ -546,6 +582,8 @@ class BasicChart extends Widget
|
|||
$values['colorChart'] = \get_parameter('colorChart');
|
||||
$values['formatData'] = \get_parameter_switch('formatData');
|
||||
$values['label'] = \get_parameter('label');
|
||||
$values['type_graph'] = \get_parameter('type_graph');
|
||||
$values['line_width'] = \get_parameter('line_width');
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
@ -606,6 +644,8 @@ class BasicChart extends Widget
|
|||
'title' => $module_name,
|
||||
'unit' => $units_name,
|
||||
'only_image' => false,
|
||||
'type_graph' => $this->values['type_graph'],
|
||||
'line_width' => (empty($this->values['line_width']) === true) ? 3 : $this->values['line_width'],
|
||||
'menu' => false,
|
||||
'vconsole' => true,
|
||||
'return_img_base_64' => false,
|
||||
|
|
Loading…
Reference in New Issue