Data into Line chart

Hi,

I will been putting the last hours of trying to get the line chart working :frowning:

I some data in the msg.payload which then is sent to the line chart element but it doesnt render the chart, what am I doing wrong? Because as you can see I have included: series, data and label)

The data in the payload:
{"series":["Today"],"data":[[{"x":1663452000000,"y":44.940000000000005},{"x":1663455600000,"y":44.39},{"x":1663459200000,"y":37.830000000000005},{"x":1663462800000,"y":44.529999999999994},{"x":1663466400000,"y":53.75},{"x":1663470000000,"y":50.480000000000004},{"x":1663473600000,"y":41.13},{"x":1663477200000,"y":85.24000000000001},{"x":1663480800000,"y":108.33999999999999},{"x":1663484400000,"y":99.42},{"x":1663488000000,"y":105.62},{"x":1663491600000,"y":105.5},{"x":1663495200000,"y":100.15},{"x":1663498800000,"y":55.57},{"x":1663502400000,"y":51.35999999999999},{"x":1663506000000,"y":53.690000000000005},{"x":1663509600000,"y":72.48},{"x":1663513200000,"y":117.97},{"x":1663516800000,"y":253.60999999999999},{"x":1663520400000,"y":279.75},{"x":1663524000000,"y":290.72},{"x":1663527600000,"y":253.95},{"x":1663531200000,"y":204.36},{"x":1663534800000,"y":142.65}]],"labels":[""]}

Your payload need to be an array

[
{"series":["Today"],"data":[[{"x":1663452000000,"y":44.940000000000005},{"x":1663455600000,"y":44.39},{"x":1663459200000,"y":37.830000000000005},{"x":1663462800000,"y":44.529999999999994},{"x":1663466400000,"y":53.75},{"x":1663470000000,"y":50.480000000000004},{"x":1663473600000,"y":41.13},{"x":1663477200000,"y":85.24000000000001},{"x":1663480800000,"y":108.33999999999999},{"x":1663484400000,"y":99.42},{"x":1663488000000,"y":105.62},{"x":1663491600000,"y":105.5},{"x":1663495200000,"y":100.15},{"x":1663498800000,"y":55.57},{"x":1663502400000,"y":51.35999999999999},{"x":1663506000000,"y":53.690000000000005},{"x":1663509600000,"y":72.48},{"x":1663513200000,"y":117.97},{"x":1663516800000,"y":253.60999999999999},{"x":1663520400000,"y":279.75},{"x":1663524000000,"y":290.72},{"x":1663527600000,"y":253.95},{"x":1663531200000,"y":204.36},{"x":1663534800000,"y":142.65}]],"labels":[""]}
]

so you need to put [ ] around it as shown above.

Awesome, thanks E1cid, that did it! :smiley:

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