This post describes how to smoothly transition between groups in a
          line chart with d3.js. It is very close
          from this other example. Here groups
          values are stored in the same column instead of having one
          distinct column each. It is the tidy or long format
          versus the previous wide or untidy format. This example
          works with d3.js v4 and v6
        
update() function is created. It
                    smoothly transforms the chart with the value of another
                    column
                  select button is changed.