Accepted answer

Your code should work fine. Confirm if you really are getting different data by doing something like

d3.json(url, function(error, data) {

Check if what you get is different each time you submit your form.

Also in case you simply copied this code from your js file, notice the .datum() of your first chart has a missing '

Related Query