How to chart two series in one graph

@zenofmud Hi, now I got it going for one series. how to use the jsonata expression for two series ?
I am able to successfully plot the chart individually once i press the individual button in Fig 1.
I want to chart both the series in same chart by pressing one button in Fig 2

also attached the debug output from prepare chart data -M05 change nodedebug1

[note: moved to new topic since the prior one was over two years old]

Have you searched the forum on how to plot two series in one graph?

1 Like

Yes Indeed, several threads, but all solutions are showing for either real time data, (Which i have already used in my flows elsewhere with two different topics feeding into one chart) or hard coded data in msg.payload. Nowhere could i find for charting 2 series in a single chart from a database. after studying the debug output from a live chart output which is plotting a 2 series chart, i now know how the formatted data should look like. The trouble for me is I don't know how to syntax the Jsonata expression to give output as I desire....


I need data: array to be [2 objects] like shown above

but I am getting single array as shown below


all i need is how to put the right syntax in Jsonata expression below to get the required syntax like high above (2 objects in 1 data: array)



I absolutely don't know the logic, but kept moving square brackets, flower brackets and comma here and there, and got it to work in one of the iteration.


1 Like

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