e updateChart function
    d3.select("#selectButton").on("change", function(d) {
        // recover the option that has been chosen
        var selectedOption = d3.select(this).property("value")
        // run the updateChart function with this selected option
        update(selectedOption)
    })

})


</script></xmp></code></pre>
            <!-- ==================================== -->

            <!-- ========= show JS code v6 ==============  -->
            <pre
              class="language-js d-none