Created
December 3, 2012 20:57
-
-
Save crtr0/4197970 to your computer and use it in GitHub Desktop.
Initialize chart data and labels arrays for Highcharts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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