Graph from raw data in scripted dashboards

I am using scripted dashboards, as discussed here: https://grafana.com/docs/grafana/latest/reference/scripting/

They work with setting influxdb queries as targets on panels, which is great. Thanks for the cool stuff!

Can I also create graphs in scripted dashboards from whatever array of points I may have on hand? Say, I get an array of (x,y) points from some external, arbitrary service that I hit in the javascript. I’d like to take that array and graph it. Something like setting the array as the target of the panel. Is that possible? I’ve looked for examples and experimented, but so far I can’t get it to work.

Thanks in advance.