Every time I search for info on this I seem to always find examples of D3.js reading minimal data from external files. I get that.
I would like to undersand how to feed my D3 chart relatively current data so it can be visualized in near real time. To be clear, my goal is to show multiple sensor data in a simple line chart over time. This would be very similar to a stock chart: y-axis = stock value and x-axis = date.
My questions are these:
- Must the data always come from a static file? or
- Can the chart be fed ‘live’ data straight from the sensor?
The problem I see with reading a static data file is that it would seem that this file is constantly changing with new data so the file would have to be constantly read to get the latest data. This does not make sense to me. Perhaps D3 has some algorithm to solve this.
All comments are most welcome.