I have the same problem with the heatmap function and App Designer. So I tried the Accepted Answer but it just does not work on my side.
I added a blank panel and tried different versions of the code such as:
So I don't understand what I did wrong...
heatmap(xvar,yvar,tbl) works fine outside of the App Designer.
Thanks in advance for any help!