title: How to do a real-time dashboard with charting
body: <p>I want to create a dashboard for a bespoke web service we have so that we can monitor usage on a real-time basis. Something similar to the couchbase dashboard if you have seen that. If not, its basically a line graph that scrolls right to left with time along the bottom of the graph and usage on the y-axis.</p>
  
  <p>To minimise data bandwidth I am assuming there is a way to pass just the changed data to update a graph rather than sending a new image/vector each time. And this would get drawn with a javascript charting library.</p>
  
  <p>What I am unclear on is how to get the data from the server. Is the normal approach to have the javascript code poll the server using AJAX every second (if you are after second by second updates) or is some other method used?</p>
  
  <p>I used PHP for the back end and HTML/JS for the client end.</p>
  
  <p>And does anyone have any examples or links that could be helpful.</p>