// Add titles
  svg
    .append("text")
    .attr("text-anchor", "start")
    .attr("y", -5)
    .attr("x", 0)
    .text(function(d){ return(d.key)})
    .style("fill", function(d){ return color(d.key) })

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

            <!-- ========= show JS code v6 ==============  -->
            <pre
              class="language-js d-none d3v6-chunk"
            ><code id="code-js-v6" contenteditable="true"><xmp><script>

// set the