Table and Chart display issue after running my query

Hi everyone,

I am running in a bit of an issue from the display.

I am running a JS query with some calculation returning an array.
After running fully, it returns correctly a result, however it is not displaying in my table and neither in my Chart (chart is calculated from the table.

One way to make it Appear, is to duplicate the chart, then delete the duplicate then both Table and Chart display data correctly.

The table is also showing "The selected data source is empty" even when it returns the value, so it seems to be a problem with the temporary data.

I am sorry my explanation is not that clear but it's hard to explain. I could record a video if needed and drop the link here.

Might be a known issue?

Thanks

Hi and welcome!

Two quick checks: are you using <your JS query name here>.data as the source for the table (can't see it in the screenshot) and what shows up when you type <your JS query name here>.data in the console? I'm personally not really understanding the issue as the screenshot shows data in the table, despite the source being shown as empty.

Perhaps a video of the issue would help.

Thank you @jg80 for the answer.

Here is a link where I recorded the issue: https://cdn.shopify.com/videos/c/o/v/c5ab1155b5d148c4a1e47b21561a82ae.mp4

To answer your question, I am using the JS return calcNsvPerAxPerDate and not {{ calcNsvPerAxPerDate.data }}.
However I just tried and duplicate the table and get {{ calcNsvPerAxPerDate.data }}

It is showing {{ calcNsvPerAxPerDate.data }} has some data, but same issue is happening on the video once the JS function is run (table is not showing data except when I refresh by duplicating + deleting a Chart or table.

Is it possible the transformer that creates the array to populate the chart isn't run until you duplicate the chart?