Created
January 14, 2010 16:07
-
-
Save Palleas/277280 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
use_javascript('/noeCommonsPlugin/js/jquery/jquery-1.3.2.min.js'); | |
use_javascript('/noeCommonsPlugin/js/jquery/jquery.gchart.min.js'); | |
use_javascript(url_for('noe_poll_service_stats', array( | |
'id' => $poll->getId(), | |
'target' => 'gchart', | |
'format' => 'js' ))); | |
?> | |
<h2>Stats</h2> | |
<div id="chartBox"> | |
</div> |
This file contains 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
$(document).ready(function() { | |
$('<div id="question1" class="oneChart"></div>').appendTo('#chartBox').gchart({ // temp | |
series: [$.gchart.series([2, 1, 3, 1], 'green')], | |
dataLabels: ["Ugly", "Very nice", "Obi-wan Kenobi", "Wait... What was the question again?"], | |
height: 200, | |
width:650, | |
margin: 0, | |
title: "What do you think about this website?", | |
titleSize: 20 | |
}); | |
$('<div id="question2" class="oneChart"></div>').appendTo('#chartBox').gchart({ // temp | |
series: [$.gchart.series([5, 2], 'green')], | |
dataLabels: ["Wat?", "No"], | |
height: 200, | |
width:650, | |
margin: 0, | |
title: "Would you like a mobile version of this website ?", | |
titleSize: 20 | |
}); | |
$('<div id="question3" class="oneChart"></div>').appendTo('#chartBox').gchart({ // temp | |
series: [$.gchart.series([5, 1, 1], 'green')], | |
dataLabels: ["Sometimes", "Wat?", "Of course I do !"], | |
height: 200, | |
width:650, | |
margin: 0, | |
title: "Do you think ?", | |
titleSize: 20 | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment