Skip to content

Instantly share code, notes, and snippets.

@crtr0
Created December 3, 2012 20:57
Show Gist options
  • Save crtr0/4197970 to your computer and use it in GitHub Desktop.
Save crtr0/4197970 to your computer and use it in GitHub Desktop.
Initialize chart data and labels arrays for Highcharts
var chartdata = [],
labels = [];
voting.forEach(function(vo, i) {
// the number of votes
chartdata.push(vo.votes);
// the label for this data point
labels.push(vo.name+' - '+(i+1));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment