This post describes how to build a line plot with a dropdown button to select group in d3.js. It follows the previous basic line plot. Note that all groups are stored in different column of the .csv
input file. This example works with d3.js v4
and v6
update()
function is created. It smoothly transforms the chart with the value of another columnselect
button is changed.