Using Alternative charts with wappler query

@Teodor
I guess what my feature request is looking for is an X-Y scatter graph. Maybe that is my issue, perhaps the line graphs x axis is always serial in nature.

Is it possible to turn a wappler query result into an array that I can pass to a charts.js graph?

Yes, you can use the app connect array component to create an array based on a server action result

1 Like

Perfect, thanks a million, now I just need to brush up on my JS to get this into the the following format for charts.js XY scatter.

[{
x: -10,
y: 0
}, {
x: 0,
y: 10
}, {
x: 10,
y: 5
}]

Are these dmx array’s JS arrays that I can use by just referencing in JS do you know? ie. In your example can I just ref arr1 in a JS script section as if it was a standard JS array?

This may help