🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

Second plot's dropdown menu not rendering correctly

I have two bar charts that are side by side rendering on an HTML page. Both have dropdown menus. The first dropdown menu works correctly, but the second menu is giving me an error:

Uncaught TypeError: Cannot read property ‘appendChild’ of null

How can I get both dropdown menus to render properly?