Black Lives Matter. Please consider donating to Black Girls Code today.

Second Dropdown not working

The new plotly.js dropdown feature is great but I can’t seem to get two graphs working at the same time. Any advice would be appreciated!


Here’s a working version:

Something was wrong with the

var innerContainer = document.querySelector('[data-num="0"'),
    plotEl = innerContainer.querySelector('.plot1'),
    countrySelector = innerContainer.querySelector('.countrydata1');

block. The querySelector call return the first dropdown <div> block, so the query calls about innerContainer return nulls.

Thank you so much! I really appreciate your help.