Two real time series chart

i find this example.

but can some explain why?
many thanks

Explain what about it?
Unless you need to do what that flow does then it is not relevant to your problem.
What exactly are you trying to do?

@Colin , hi i want to display both real time series curve in one chart.
that is two real time curve?
i have try

var total =;
for(var i = 0;i<=20 ; i++){
   temp.push({"x"[0].datapoints[i].at, "y":parseInt([0].datapoints[i].value.substr(-6))/10
   wind.push({"x"[0].datapoints[i].at, "y":parseInt([0].datapoints[i].value.substr(9,11))/100
msg1.topic = "A"
msg1.payload = [{
"series": ["WindSpeed"],
"data": [ temp],
"labels": [""]

msg2.topic = "B"
msg2.payload = [{
"series": ["Temperature"],
"data": [ wind],
"labels": [""]

return msg1,msg2;

but without success.

and this is my single real time curve with result from API

let data =[];
//for (let prop in msg.payload) {
//    data.push({"x"[1].datapoints[prop].value, "y":msg.payload[prop].at});

for (var i = 0; i<total; i++){
    data.push({"x"[0].datapoints[i].at, "y":parseInt([0].datapoints[i].value.substr(-6))/10
//[1].datapoints[0].value = data;
return msg;

series = [];
data = [];
data_1 = [];

labels = [];
var msg1 = {};
var msg2 = {};
msg.payload = [{"series":series, "data":data,"labels": labels}];

//msg2.payload = [{"series":series, "data":data,"labels": labels}];

return msg;

Read the node red docs page on Writing Functions to see how to correctly return two messages.

i have successful in sending two messgae,
by modifyingreturn [[msg1,msg2]];
however, the chart is now displaying only the chart on ONLY last msg,

but not both
any more hints , thanks

You don't need to send two separated messages. You have data for two series.
Do following

msg.payload = [{
"series": ["WindSpeed","Temperature"],
"data": [ wind,temp],
"labels": [""]

it works well

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.