This might help you: https://github.com/d3/d3-request/blob/master/README.md#request
Edit: updated link to API v4
firstly, you need a page on the server that will output the data in JSON format*. Once you have that page, call it from the browser, and you should get the encoded data appearing on screen (this will prove that the page is hosted properly and returning data)
Next, follow the simple example on the D3 docs link that Yeco posted. You'll need to replace the dummy URL with the address to your new data page, and stick your own function call in there to redraw the chart with the new data.
*Note: I am not familiar with PHP, but it should have either a native JSON encoder, or a library will be available on the net. You'll also need to make sure you set the response mime type appropriately - a quick google should give you the correct mime type - it's something like 'application/json' I think, but can't remember of the top of my head
- Dynamically loading external data from database into d3.js
- Links not visible when loading json data dynamically into D3 Network Visualization
- Loading internal JSON data rather than from an external resource / file for a sunburst in d3
- Loading data from Angular AJAX-call into D3-graph
- Loading D3.js data from a simple JSON string
- D3.js loading local data file from file:///
- How to load data from an internal JSON array rather than from an external resource / file for a collapsible tree in d3.js?
- D3.js -- loading and manipulating external data
- How to pull data from mysql database and visualize with D3.JS?
- Bringing data from PHP into D3.JS
- Display only values from the data set into X axis ticks
- Copy data from csv into array in D3
- Create data visualizations using Express and get data from a PostgreSQL database
- Preparing Data to Plot in d3.js from Ruby on Rails Database
- display data from csv file into BarGraph using d3.js
- Plotly/D3 – Reading data from CSV into separate traces
- How to create d3 graph using data from Rails database
- D3 - Loading data from a second CSV
- How to load external JSON data from a Web API in d3.js?
- how to visualize data from mysql database in force layout of d3 tool
- queue.js pass data from local variable not from external file
- Make a line chart in D3.js loading data from an array
- dc.js, fill table with data from object dynamically
- reading d3 data in from a file rather than hard coding it into a programme
- plotting data points on waves from dynamically generated data using d3.js
- reformatted data into JSON from CSV, can't get parsing right in D3
- get data from external json with react and d3
- D3 - Loading data from JSON doesn't work
- Data array from Couchdb documents into D3
More Query from same tag
- D3 force layout - How to achieve 3D look of nodes?
- Child elements not appearing in webpage
- D3.js style management robust to changes
- d3.json response inside wrong callback variable
- Embedding d3.js graph in a web2py bootstrap page
- D3.js v5 - simple streamgraph not rendering
- D3 Line Graph with Dates on one Axis: What's Missing
- sorting d3js bar chart
- Dynamically Update Multiple Charts in D3
- Svg image representing a node, varying node size in a force-directed graph
- drag circle area rather than border
- Changing number values for text on Y Axis label for dc.js ScatterPlot
- Hide some parts of a <path> generated with a curve interpolation
- text not showing in forcelayout d3js but present in view
- Starting d3 force-layout collapsed, text labels duplicating
- html in d3.js text tag
- Slicing data in d3.js
- d3v4 line generator returns NaN
- Access parent attribute in d3.js to set attribute of child
- Match Arrowhead Color to Line Color in D3
- In d3.js, linear scale/axis with ticks at intervals of 2^(10*c) instead of 10^c?
- D3: How delete shape on click event?
- nvd3 positive and negative value for same timestamp
- Error parsing date for X axis
- parentNode in d3 svg
- d3.js: How to populate cells with color for blank values?
- D3 Force Layout with Image as Node but Wrong Images are Appended
- Example of d3.js animated Radial Chart