changed selection label to unit in graphics
This commit is contained in:
@ -328,6 +328,7 @@ let graphs = (function (){
|
||||
*/
|
||||
function createSelection(gindex){
|
||||
let graph_elm = graph_elm_array[gindex];
|
||||
console.log("clear for createSelection", gindex)
|
||||
clear(gindex);
|
||||
|
||||
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
|
||||
*/
|
||||
function createGraph(gindex, block){
|
||||
console.log("clear for create graph", gindex)
|
||||
clear(gindex);
|
||||
tag_dict[block.tag] = gindex;
|
||||
let dict = {} // {string: [name:string, label:string, color:string, original_color:string]}
|
||||
@ -1201,6 +1203,9 @@ let graphs = (function (){
|
||||
jumpToDate: jumpToDate,
|
||||
initGraphs: initGraphs,
|
||||
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
|
||||
dselect.classList.add('dselect');
|
||||
dselect.innerHTML = "[" + tag + "]";
|
||||
dselect.innerHTML = "[" + y_label + "]";
|
||||
dselect.addEventListener('click', function(e){
|
||||
graphs.createSelection(gindex);
|
||||
})
|
||||
|
Reference in New Issue
Block a user