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!

http://stackoverflow.com/questions/39068452/uncaught-typeerror-cannot-read-property-append-of-null

Thanks!

Here’s a working version: http://codepen.io/etpinard/pen/LkoxWY

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.