Multiple lines on a single chart

Hi everyone, I have four HTTP IN nodes defined in a flow. They all receive information from four devices through HTTP GET request.

The HTTP INs are /Device1, /Device2, /Device3, /Device4

Now I want to show all the data on a single chart irrespective of time of receiving of data from 4 different devices.

How do I proceed ?

I am assuming the data are single point data values, if so just give each device a unique msg.topic and feed them into the chart node.

If I understand the question you just feed all the values in separately with different topics. The chart will draw a line for each topic.

hi @Colin,
i have taken written the function node like this;

msg.payload = [{
"series": ["ULS1","ULS2","ULS3","ULS4"],
"data": [[msg.payload.level1],[msg.payload.level2],[msg.payload.level3],[msg.payload.level4]],
"labels": ["Jan","Jan","Jan","jan"]
}]
return msg;

Do the values that come in via the http nodes each reflect the current value of a single mearurement in the outside world? If not then you need to tell us more about exactly what you are getting via the http nodes.

If they do each represent a single measurement then you don't need to join them into one message. Just feed each one into the chart in the payload with a topic that identifies that measurement. That is all you need.

@Colin I just did using different topics and it worked like a charm.

Thanks everyone.

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