Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- datasets: [{
- label: '1st count',
- backgroundColor: window.chartColors.green,
- data: [<?php echo $this->getVotesCountArrayForCount(1); ?> ]
- }, {
- label: '2nd count',
- backgroundColor: window.chartColors.yellow,
- data: [ $this->getVotesCountArrayForCount(1); ]
- }]
- <?php
- function getVotesCountArraforCount($count)
- {
- $votesArrayForCount = array();
- foreach($this->getRemainingCandidates() as $candidate)
- {
- $votesArrayForCount[] = $this->VotesPerCandidateByCount[$candidate][$count];
- }
- return $votesArrayForCount;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement