Skip to content Skip to sidebar Skip to footer

D3js Data Load And Update

I am using D3JS library in order to load a CSV data named 'data.csv'. By clicking on the button, I output on the console the data length. My problem is that if I change the data in

Solution 1:

Like Andrew pointed out browser might be caching the file. Maybe you could add query parameter, for example:

function read_data(){
     Plotly.d3.csv("data.csv?”+(new Date()).getTime(), function(error, data) {
         console.log("Data length = " + data.length)
 })}

Post a Comment for "D3js Data Load And Update"