I'm trying to load data from a CSV file in D3; I have this code:
function update (error, data) {
if (error !== null) {
alert ("Couldn't load the dataset!");
} else {
//do something
};
function changeData () {
d3.csv ("data/dataset.csv", update);
}
If I use D3 v4 it works fine, but if I switch to v5 it doesn't work anymore. Can someone explain to me how to modify the code to make it work with D3 v5?