I searched for a day or 2 answers to this question, but have not found it yet. I have an external application that periodically modifies a TSV file (adding data). I use an example of a basic chart to display data, and it looks very good:

Now I want the data to be updated when the TSV file is updated. I want to be able to set automatic updating of the data that it extracts from the tsv file, and re-populates the graph without refreshing the entire page.
I tried to just wrap the current code in a function and call setInterval for that function, but the data remains the same every time (perhaps because it is cached?).
Ideally, a solution to this would be a function that you can call to update whenever you want (based on a custom event, timer, whatever).
Any ideas, links or suggestions for alternative ways to achieve the same goal will be greatly appreciated!
As a bonus question: I understand that D3 may not be the right choice for this kind of Psudo-Real-Time data display. Are there other packages that are more amenable to this? The data-generating application is a C # application (if that matters).
Edit: As an additional explanation, imagine this example, but with data read from the file: http://mbostock.github.com/d3/tutorial/bar-2.html
source share