Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2118 robert 1
<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
2
 
3
<?php if (wpsg_isSizedArray($this->view['chart']['data']['records'])) { ?>
4
 
2335 robert 5
<div id="chartsalestopaymentmethod-bar" style="height:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_width'); ?>px;"></div>
2118 robert 6
 
7
<br/>
3254 robert 8
<h3><?php echo __('Anteile (prozentual)', 'wpsg'); ?></h3>
2350 robert 9
<div id="chartsalestopaymentmethod-pie" style="height:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_bar_chart_width'); ?>px;"></div>
2118 robert 10
 
2350 robert 11
<br/>
12
 
13
<div id="table-data">
14
	<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartsalestopaymentmethod/data.phtml'); ?>
15
</div>
16
 
17
<div class="wpsg_clearer"></div>
18
 
2118 robert 19
<?php
20
 
21
	foreach ($this->view['chart']['data']['records'] as $data)
22
	{
23
		$barChartJS['payment'] .= "'".wpsg_hspc($data['name'])."', ";
24
		$barChartJS['total'] .= wpsg_hspc($data['total']).", ";
25
		$pieChartJS .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent'])."], ";
26
	}
27
 
28
	$barChartJS['payment'] = substr($barChartJS['payment'], 0, -2);
29
	$barChartJS['total'] = substr($barChartJS['total'], 0, -2);
30
	$pieChartJS = substr($pieChartJS, 0, -2);
31
 
32
?>
33
 
34
<script type="text/javascript">
35
	jQuery(document).ready(function()
36
	{
37
 
38
		jQuery.jqplot.config.enablePlugins = true;
39
	    var totals = [<?php echo $barChartJS['total']; ?>];
40
	    var payment = [<?php echo $barChartJS['payment']; ?>];
41
 
42
	    var chartsalestopaymentmethodBar = jQuery.jqplot('chartsalestopaymentmethod-bar', [totals], {
43
	        animate: !jQuery.jqplot.use_excanvas,
44
	        seriesDefaults:{
45
	            renderer:jQuery.jqplot.BarRenderer,
46
	            rendererOptions: {
47
                	varyBarColor: true
48
              	},
49
	            pointLabels: { show: true }
50
	        },
51
	        axesDefaults: {
52
	            labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
53
	        },
54
	        axes: {
55
	            xaxis: {
56
	                renderer: jQuery.jqplot.CategoryAxisRenderer,
57
	                ticks: payment,
58
	                label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>'
59
	            },
60
	            yaxis:{
61
	                label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
62
	                tickOptions: {
63
	            		formatter: wpsg_statistics_number_format
64
                	},
65
    				min:0
66
	            }
67
	        },
68
	        highlighter: { show: false }
69
	    });
70
 
71
	    var data = [<?php echo $pieChartJS; ?>];
72
 
73
	  	var chartsalestopaymentmethodPie = jQuery.jqplot ('chartsalestopaymentmethod-pie', [data],
74
	    {
75
	      seriesDefaults: {
76
	        renderer: jQuery.jqplot.PieRenderer,
77
	        rendererOptions: { padding: 50, sliceMargin: 4, showDataLabels: true }
78
	      },
79
	      legend: { show:true, location: 'e' }
80
	    }
81
	  	);
82
 
83
	  	wpsg_statistic_addExportButton();
84
 
85
	});
86
</script>
87
 
2336 robert 88
 
2118 robert 89
<?php } else { ?>
90
<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
91
<?php } ?>