changed selection label to unit in graphics
This commit is contained in:
@ -328,6 +328,7 @@ let graphs = (function (){
|
|||||||
*/
|
*/
|
||||||
function createSelection(gindex){
|
function createSelection(gindex){
|
||||||
let graph_elm = graph_elm_array[gindex];
|
let graph_elm = graph_elm_array[gindex];
|
||||||
|
console.log("clear for createSelection", gindex)
|
||||||
clear(gindex);
|
clear(gindex);
|
||||||
|
|
||||||
let selection = document.createElement('div');
|
let selection = document.createElement('div');
|
||||||
@ -405,6 +406,7 @@ let graphs = (function (){
|
|||||||
* @param {{tag:string, unit:string, curves:[{name:string, label:string, color:string, original_color:string}]}} block - The information of the block to create
|
* @param {{tag:string, unit:string, curves:[{name:string, label:string, color:string, original_color:string}]}} block - The information of the block to create
|
||||||
*/
|
*/
|
||||||
function createGraph(gindex, block){
|
function createGraph(gindex, block){
|
||||||
|
console.log("clear for create graph", gindex)
|
||||||
clear(gindex);
|
clear(gindex);
|
||||||
tag_dict[block.tag] = gindex;
|
tag_dict[block.tag] = gindex;
|
||||||
let dict = {} // {string: [name:string, label:string, color:string, original_color:string]}
|
let dict = {} // {string: [name:string, label:string, color:string, original_color:string]}
|
||||||
@ -1201,6 +1203,9 @@ let graphs = (function (){
|
|||||||
jumpToDate: jumpToDate,
|
jumpToDate: jumpToDate,
|
||||||
initGraphs: initGraphs,
|
initGraphs: initGraphs,
|
||||||
onZoomCompleteCallback:onZoomCompleteCallback,
|
onZoomCompleteCallback:onZoomCompleteCallback,
|
||||||
|
|
||||||
|
prev_blk:prev_blk,
|
||||||
|
tag_dict:tag_dict
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
@ -1216,7 +1221,7 @@ function Graph(gindex, container, x_label, y_label, tag, scaleType = "linear"){
|
|||||||
|
|
||||||
let dselect = document.createElement('div'); //the clickable unit to select the curves we want to display
|
let dselect = document.createElement('div'); //the clickable unit to select the curves we want to display
|
||||||
dselect.classList.add('dselect');
|
dselect.classList.add('dselect');
|
||||||
dselect.innerHTML = "[" + tag + "]";
|
dselect.innerHTML = "[" + y_label + "]";
|
||||||
dselect.addEventListener('click', function(e){
|
dselect.addEventListener('click', function(e){
|
||||||
graphs.createSelection(gindex);
|
graphs.createSelection(gindex);
|
||||||
})
|
})
|
||||||
|
@ -452,7 +452,7 @@ class InfluxDataGetter:
|
|||||||
variable ({"name":(str), "label":(str), "unit":(str)[,"has_potential_target":(bool)]}) : a dictionnary containing the Influx name of the corresponding variable out of the setup_info dict,
|
variable ({"name":(str), "label":(str), "unit":(str)[,"has_potential_target":(bool)]}) : a dictionnary containing the Influx name of the corresponding variable out of the setup_info dict,
|
||||||
the label to display in the Web GUI, its unit and possibly a boolean value indicating if the variable has a target available.
|
the label to display in the Web GUI, its unit and possibly a boolean value indicating if the variable has a target available.
|
||||||
"""
|
"""
|
||||||
key = variable["cat"]+variable["unit"]
|
key = variable["cat"]+"_"+variable["unit"] if variable["cat"] != "" else variable["unit"]
|
||||||
if key not in groups.keys():
|
if key not in groups.keys():
|
||||||
groups[key] = {"tag":key, "unit":variable["unit"], "curves":[]} #tag is set to cat+unit while client is not modified
|
groups[key] = {"tag":key, "unit":variable["unit"], "curves":[]} #tag is set to cat+unit while client is not modified
|
||||||
groups[key]["curves"].append({
|
groups[key]["curves"].append({
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
[chart]
|
[chart]
|
||||||
|
T_stat=other
|
||||||
T_stat.raw=
|
T_stat.raw=
|
||||||
T_nvd.raw=
|
T_nvd.raw=
|
Reference in New Issue
Block a user