It looks like you are retrieving a file, of which the content does not change.

d3.json("sample.json", [...]

If sample.json is not changing, your data will remain the same. You need some server side processing to generate a new json file in that location, or you need to use some kind of API to retrieve dynamic values (maybe out of a database). The code you have could then use that data.


May be it is browser cache. Try this:

d3.json("sample.json?v=", function(error, data) { ...

Related Query

More Query from same tag