Hello,
Is it possible to set a variable inside a bucket script in tsvb? i would like to compare two values and set the new variable to be the value that exists.
right now I have:
my code
if (params.inmin != null) {
params.in= params.inmin;
} else if (params.inhour != null) {
params.in=params.inhour;
}
if (params.outmin != null) {
params.out= params.outmin;
} else if (params.outhour != null) {
params.out=params.outhour;
}
if (params.in > 0.50) {
params.solved=1;
} else if (params.out > 0.50) {
params.solved=1;
} else {
if (params.in > params.out) {
params.solved=params.in;
} else if (params.out > params.in) {
params.solved=params.out;
}
}
return params.solved;
which results in:
but i would expect to see the line go all the way across the graph.
any help with this would be great!
Thank you