Multiline Chart with JSONata

It is working for me with the latest code you posted.

The code uses jsonata function $distinct that is somehow new (added with jsonata 1.7.0). What is the Node-RED version used in your testing ?