Display chart using chartUI node taking x,y axis value from previously defined array

I am using openweathermap api to access temp, wind speed and direction which i need in my ML model. I have accessed the relevant fields: and now my msg.payload gives output of array of 40 elements in this format:
[ {"Timestamp":1592524800,"Temperature":35.06,"WindSpeed":2.45,"WindDirection":136},{"Timestamp":1592946000,"Temperature":35.85,"WindSpeed":4.03,"WindDirection":132} ]

Now I want to make a chart using Chartui node in dashboard where X axis is Timestamp in my array and Y axis is Temperature field.
Kindly help me, how can i display such graphs where i can give my own x axis field and y axis field?

If you look at the these docs then about half way down it shows you how to structure the data so you can feed it to the chart. Pay careful attention to getting the data structure as shown.

You have to transform the array that you have into the data structure described there. Post the format that you think you want the data to be in (imagine that you just have the two samples you showed earlier, what should the data going to the chart look like?
If you haven't already read the docs page Working with Messages then read that too.

1 Like

I went through the doc again and saw the examples given. Thankyou so much, it worked!

1 Like

Excellent, glad to be of help, though all I did was point you in the right direction I think.

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