Sorting the Bars of a Bar Chart

Hi.
I am using a slightly modified version of node-red in something called LoopEdge/LoopFlows but I believe it works in the same way as usual node-red.

I have a bar chart and I was wondering, is there any way I could order the bars so they appear in the same order each time? (D20...D24)

This is my flow right now:
image
At the moment, the bars on the chart appear as each device connects, which happens in a random order... I'm not sure if regular node-red has the green nodes, but after they connect, they pass JSON to my function, which extracts values as msg.payload and msg.topic, and sends it to the chart.

I'm not sure if this is even possible to do because of the way the data appears.

Sorry if this is difficult to understand. I'm not very knowledgeable about node-red... can anybody tell me what might be a solution?

The chart node contains information how to format the data you want.

Inputting a msg.payload containing a blank array [] will clear the chart.
See this information for how to pre-format data to be passed in as a complete chart.

The easiest way is to to send one set of dummy data in the correct order at start time, so when real data arrives the chart is ready..

Given you are using a commercial package based on Node-RED rather than Node-RED itself, can you explain a bit more about it?

Do you know what version of Node-RED it is based on?
What version of nodejs does it use?
Can you install nodes yourself?
What version of the dashboard are you using?

@ukmoose - it's an old one... :-)... the more relevant question is - do they have a support line you can ask ? :slight_smile:

Thanks for the link, I'll have a look. :slight_smile:

I'm not actually too sure. I'll should've tried to find out more about it before posting.

The version of node-red I'm using is 1.3.1. Dashboard version is 2.8.0... I might be able to install a newer versions, so I'll try that as well.
There is an option to install nodes myself.

I may have found a way to do it for now, although it's a bit unpredictable. I changed something on the PLC where my data is coming from, not in the software directly.

unfortunately that’s not the version number of Node-RED but the commercial package you are using.

Node-RED is currently on version 0.20.7
with a beta of Node-RED v1.0

I wouldn’t suggest installing any nodes until you know the version of nodejs and the version of Node-RED it is based on.