Skip to content

Instantly share code, notes, and snippets.

@dsjoerg
Created February 5, 2012 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsjoerg/1742222 to your computer and use it in GitHub Desktop.
Save dsjoerg/1742222 to your computer and use it in GitHub Desktop.
the heart of the code for updating highcharts chart
function updateData() {
for (i=0; i<2; i++) {
chart.series[i == 0 ? 1 : 0].setData(thedata[roundNum][i]);
}
if (roundNum < thedata.length-1) {
roundNum++;
}
setTimeout(updateData, 15);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment