コード例 #1
0
ファイル: contact.php プロジェクト: jbrauchler/directory
		var $value = $(this).val();
		$("div.chart").hide();
		$("#"+$value).show();
		plot1.replot();
		plot2.replot();
	});
	
	<?php 
        if ($contact->count_interactions() != 0) {
            ?>
	var data = <?php 
            echo $contact->jqplot_load_interactions_by_dept();
            ?>
;
  var data2 = <?php 
            echo $contact->jqplot_load_interactions_by_person();
            ?>
;
	var plot1 = jQuery.jqplot ('chart1', [data], 
		{
			title: "Interactions per Department (Top 8)",
			seriesDefaults: {
				// make this a donut chart.
				renderer:$.jqplot.DonutRenderer,
				rendererOptions:{
					// Donut's can be cut into slices like pies.
					sliceMargin: 3,
					showDataLabels: true,
					// By default, data labels show the percentage of the donut/pie.
					// You can show the data 'value' or data 'label' instead.
					dataLabels: 'value',