To get realtime data in a d3 chart, you will need to either implement a polling script on the JSON URL or utilize websockets for real-time communication.

A polling script would query the JSON URL every X seconds, and execute the d3 add / update / delete pattern as appropriate.

With websockets, you can maintain a persistant connection to the API and the server sends messages to connected clients when the data is updated. This again would call the d3 add / update / delete pattern.

SO example with web sockets:

Polling example:

Related Query

More Query from same tag