Subversion Repositories wpShopGermany4

Rev

Rev 5261 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5261 Rev 5997
Line 15... Line 15...
15
</div>
15
</div>
16
 
16
 
17
<div class="wpsg_clearer"></div>
17
<div class="wpsg_clearer"></div>
18
	
18
	
19
<?php 
19
<?php 
-
 
20
	$barChartJS = Array();
-
 
21
	$pieChartJS = Array();
-
 
22
	$barChartJS['amount'] = '';
-
 
23
	$barChartJS['payment'] = '';
-
 
24
	$barChartJS['total'] = '';
20
 
25
 
-
 
26
	$pieChartJS['amount'] = '';
-
 
27
	$pieChartJS['sales'] = '';
-
 
28
	$pieChartJS['percent'] = '';
-
 
29
	
21
	foreach ($this->view['chart']['data']['records'] as $data) 
30
	foreach ($this->view['chart']['data']['records'] as $data) 
22
	{ 
31
	{ 
23
		$barChartJS['payment'] .= "'".wpsg_hspc($data['name'])."', "; 
32
		$barChartJS['payment'] .= "'".wpsg_hspc($data['name'])."', "; 
24
		$barChartJS['total'] .= wpsg_hspc($data['total']).", "; 
33
		$barChartJS['total'] .= wpsg_hspc($data['total']).", "; 
25
		$pieChartJS .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent'])."], ";
34
		$pieChartJS['percent'] .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent'])."], ";
26
	} 
35
	} 
27
	
36
	
28
	$barChartJS['payment'] = substr($barChartJS['payment'], 0, -2); 
37
	$barChartJS['payment'] = substr($barChartJS['payment'], 0, -2); 
29
	$barChartJS['total'] = substr($barChartJS['total'], 0, -2); 
38
	$barChartJS['total'] = substr($barChartJS['total'], 0, -2); 
30
	$pieChartJS = substr($pieChartJS, 0, -2);
39
	$pieChartJS['percent'] = substr($pieChartJS['percent'], 0, -2);
31
 
40
 
32
?>
41
?>
33
 
42
 
34
<script type="text/javascript">
43
<script type="text/javascript">
35
	jQuery(document).ready(function()
44
	jQuery(document).ready(function()
Line 53... Line 62...
53
	        },
62
	        },
54
	        axes: {
63
	        axes: {
55
	            xaxis: {
64
	            xaxis: {
56
	                renderer: jQuery.jqplot.CategoryAxisRenderer,
65
	                renderer: jQuery.jqplot.CategoryAxisRenderer,
57
	                ticks: payment,
66
	                ticks: payment,
58
	                label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>'
67
	                label:'<?php echo wpsg_hspc(wpsg_getStr($this->view['chart']['info']['xaxis']['label'])); ?>'
59
	            },
68
	            },
60
	            yaxis:{
69
	            yaxis:{
61
	                label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
70
	                label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
62
	                tickOptions: {
71
	                tickOptions: {
63
	            		formatter: wpsg_statistics_number_format
72
	            		formatter: wpsg_statistics_number_format
Line 66... Line 75...
66
	            }
75
	            }
67
	        },
76
	        },
68
	        highlighter: { show: false }
77
	        highlighter: { show: false }
69
	    });
78
	    });
70
 
79
 
71
	    var data = [<?php echo $pieChartJS; ?>];
80
	    var data = [<?php echo $pieChartJS['percent']; ?>];
72
		  
81
		  
73
	  	var chartsalestopaymentmethodPie = jQuery.jqplot ('chartsalestopaymentmethod-pie', [data],
82
	  	var chartsalestopaymentmethodPie = jQuery.jqplot ('chartsalestopaymentmethod-pie', [data],
74
	    {
83
	    {
75
	      seriesDefaults: {
84
	      seriesDefaults: {
76
	        renderer: jQuery.jqplot.PieRenderer,
85
	        renderer: jQuery.jqplot.PieRenderer,