How would I implement a loading icon for a bar chart running a sql statement

You could also try this template. Essentially, load any animated gif into the Image Manager, and set the imagePath property to match. Boom, animated gifs.

Animated Gif_2017-09-05_2317.proj (5.9 KB)