Removed reduced + original_color for influx, doc for influxgraph

This commit is contained in:
l_samenv
2024-09-09 15:32:08 +02:00
parent 3ae1097b22
commit 6a63da07d4
4 changed files with 34 additions and 40 deletions

View File

@ -499,13 +499,13 @@ let graphs = (function (){
* Adds the received dataset in the graph being created
* Sets the visualization window, conditionnaly autoscale, applies the changes, and show the legend
* @param {number} gindex - The position of the graph in the container
* @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}]}} 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]}
let dict = {} // {string: [name:string, label:string, color:string]}
for (let curve of block.curves) {
if (curve.show !== false) {
vars_array[gindex].push(curve.name);
@ -1003,7 +1003,7 @@ let graphs = (function (){
}
/**
* Inits the graph content
* @param {[{tag:string, unit:string, curves:[{name:string, label:string, color:string, original_color:string}]}]} blocks - the received blocks
* @param {[{tag:string, unit:string, curves:[{name:string, label:string, color:string}]}]} blocks - the received blocks
*/
function initGraphs(blocks){
buildGraphicsUI();
@ -1012,7 +1012,7 @@ let graphs = (function (){
/**
* Holds the received variables from the /getvars call, gets the server time, then creates the graphs
* @param {[{tag:string, unit:string, curves:[{name:string, label:string, color:string, original_color:string}]}]} blocks_arg - the received blocks
* @param {[{tag:string, unit:string, curves:[{name:string, label:string, color:string}]}]} blocks_arg - the received blocks
*/
function receivedVars(blocks_arg){
maxTime = timeRange[1]*1000;
@ -1962,7 +1962,7 @@ function Graph(gindex, container, x_label, y_label, tag, scaleType = "linear"){
/**
* Called when new data is received from the server (SSE).
* Appends new data to the corresponding curves' datasets
* @param {{type:"graph-update", reduced:boolean, time:number, graph:{string:[[(number),(number)]]}}} graph - The graph response from the server
* @param {{type:"graph-update", time:number, graph:{string:[[(number),(number)]]}}} graph - The graph response from the server
*/
function updateCharts2(graph){
if(!graphs.doUpdates()) {