Changing panel appearance during processing

This is an issue with the appearance of CSS grid panels while the background code is processing.
I have a CSS grid that consists of 4 panels. These panels will be populated with charts and tables. The javascript code to produce the charts and tables takes some time to execute. I am trying to find a solution that dims the panels while the javascript code is processing.
Some pseudo-code

Commands to dim panels 1 and 2
Javascript Function 1 (generates a d3 map)
Javascript Function 2 (generates a dataTable)
Commands that restore panels 1 and 2, AND preserves the output of the Javascript functions

I have looked everywhere for this functionality and haven’t found anything that works.
I’m using Chrome if that matters,

I would appreciate any suggestions on how to do this.

Here is my site Read-Only: LINK
(how to share your site Read-Only link)