2116 |
robert |
1 |
<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
|
|
|
2 |
|
|
|
3 |
<?php if (wpsg_isSizedArray($this->view['chart']['data']['records'])) { ?>
|
2335 |
robert |
4 |
<div id="charttopsellertosales-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>
|
2116 |
robert |
5 |
|
2307 |
robert |
6 |
<br />
|
3254 |
robert |
7 |
<h3><?php echo __('Umsatz (prozentual)', 'wpsg'); ?><h3>
|
2335 |
robert |
8 |
<div id="charttopsellertosales-pie-sales" style="height:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_width'); ?>px;"></div>
|
2116 |
robert |
9 |
|
2307 |
robert |
10 |
<br />
|
3254 |
robert |
11 |
<h3><?php echo __('Menge (prozentual)', 'wpsg'); ?><h3>
|
2350 |
robert |
12 |
<div id="charttopsellertosales-pie-amount" style="height:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_pie_chart_width'); ?>px;"></div>
|
2307 |
robert |
13 |
|
2350 |
robert |
14 |
<br/>
|
|
|
15 |
|
|
|
16 |
<div id="table-data">
|
|
|
17 |
<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/charttopsellertosales/data.phtml'); ?>
|
|
|
18 |
</div>
|
|
|
19 |
|
|
|
20 |
<div class="wpsg_clearer"></div>
|
|
|
21 |
|
2116 |
robert |
22 |
<?php
|
|
|
23 |
|
|
|
24 |
foreach ($this->view['chart']['data']['records'] as $data)
|
|
|
25 |
{
|
|
|
26 |
$barChartJS['payment'] .= "'".wpsg_hspc($data['name'])."', ";
|
2304 |
robert |
27 |
$barChartJS['amount'] .= "['".wpsg_hspc($data['name'])."','".wpsg_hspc($data['amount'])."'], ";
|
2116 |
robert |
28 |
$barChartJS['total'] .= wpsg_hspc($data['total']).", ";
|
2307 |
robert |
29 |
$pieChartJS['amount'] .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent-amount'])."], ";
|
|
|
30 |
$pieChartJS['sales'] .= "['".wpsg_hspc($data['name'])."', ".wpsg_hspc($data['percent-sales'])."], ";
|
2116 |
robert |
31 |
}
|
|
|
32 |
|
2304 |
robert |
33 |
$barChartJS['amount'] = substr($barChartJS['amount'], 0, -2);
|
2116 |
robert |
34 |
$barChartJS['payment'] = substr($barChartJS['payment'], 0, -2);
|
|
|
35 |
$barChartJS['total'] = substr($barChartJS['total'], 0, -2);
|
|
|
36 |
|
2307 |
robert |
37 |
$pieChartJS['amount'] = substr($pieChartJS['amount'], 0, -2);
|
|
|
38 |
$pieChartJS['sales'] = substr($pieChartJS['sales'], 0, -2);
|
|
|
39 |
|
2116 |
robert |
40 |
?>
|
|
|
41 |
|
|
|
42 |
<script type="text/javascript">
|
|
|
43 |
jQuery(document).ready(function(){
|
|
|
44 |
jQuery.jqplot.config.enablePlugins = true;
|
|
|
45 |
var totals = [<?php echo $barChartJS['total']; ?>];
|
|
|
46 |
var payment = [<?php echo $barChartJS['payment']; ?>];
|
2304 |
robert |
47 |
var amount = [<?php echo $barChartJS['amount']; ?>];
|
|
|
48 |
|
|
|
49 |
//eries:[{renderer:jQuery.jqplot.BarRenderer}, {xaxis:'x2axis', yaxis:'y2axis'}],
|
|
|
50 |
|
|
|
51 |
var charttopsellertosalesBar = jQuery.jqplot('charttopsellertosales-bar', [totals, amount], {
|
2116 |
robert |
52 |
animate: !jQuery.jqplot.use_excanvas,
|
|
|
53 |
axesDefaults: {
|
|
|
54 |
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
|
|
|
55 |
},
|
2304 |
robert |
56 |
/*{Each series has same options as seriesDefaults},
|
|
|
57 |
{You can override each series individually here}*/
|
|
|
58 |
series:[
|
|
|
59 |
{
|
|
|
60 |
renderer:jQuery.jqplot.BarRenderer,
|
|
|
61 |
rendererOptions: {
|
|
|
62 |
varyBarColor: true
|
|
|
63 |
},
|
|
|
64 |
pointLabels: { show: true }
|
|
|
65 |
},
|
|
|
66 |
{
|
|
|
67 |
xaxis:'x2axis',
|
|
|
68 |
yaxis:'y2axis'
|
|
|
69 |
}
|
|
|
70 |
],
|
|
|
71 |
grid: {
|
|
|
72 |
drawGridLines: false
|
|
|
73 |
},
|
2116 |
robert |
74 |
axes: {
|
|
|
75 |
xaxis: {
|
|
|
76 |
renderer: jQuery.jqplot.CategoryAxisRenderer,
|
|
|
77 |
ticks: payment,
|
|
|
78 |
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
|
|
|
79 |
tickOptions: {
|
|
|
80 |
angle: -50,
|
|
|
81 |
fontFamily: 'Arial',
|
|
|
82 |
fontSize: '10pt',
|
|
|
83 |
fontWeight: 'normal',
|
|
|
84 |
textColor: '#666666'
|
|
|
85 |
},
|
|
|
86 |
label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
|
|
|
87 |
labelOptions: {
|
|
|
88 |
fontFamily: 'Arial',
|
|
|
89 |
fontSize: '14pt',
|
|
|
90 |
fontWeight: 'bold',
|
|
|
91 |
textColor: '#666666'
|
|
|
92 |
}
|
|
|
93 |
},
|
2304 |
robert |
94 |
x2axis: {
|
|
|
95 |
renderer: jQuery.jqplot.CategoryAxisRenderer,
|
|
|
96 |
label: '',
|
|
|
97 |
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer,
|
|
|
98 |
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
|
|
|
99 |
showMarker: false,
|
|
|
100 |
showTickMarks:false,
|
|
|
101 |
showticks: false,
|
|
|
102 |
tickOptions: {
|
|
|
103 |
}
|
|
|
104 |
},
|
2116 |
robert |
105 |
yaxis:{
|
|
|
106 |
label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
|
|
|
107 |
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
|
|
|
108 |
tickOptions: {
|
|
|
109 |
fontFamily: 'Arial',
|
|
|
110 |
fontSize: '8pt',
|
|
|
111 |
fontWeight: 'normal',
|
|
|
112 |
textColor: '#666666',
|
|
|
113 |
formatter: wpsg_statistics_number_format
|
|
|
114 |
},
|
|
|
115 |
min:0
|
2304 |
robert |
116 |
},
|
|
|
117 |
y2axis: {
|
|
|
118 |
label: '<?php echo __('Menge', 'wpsg'); ?>',
|
|
|
119 |
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer,
|
|
|
120 |
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
|
|
|
121 |
tickOptions: {
|
|
|
122 |
showGridline: false,
|
|
|
123 |
fontFamily: 'Arial',
|
|
|
124 |
fontSize: '8pt',
|
|
|
125 |
fontWeight: 'normal',
|
|
|
126 |
textColor: '#666666',
|
2335 |
robert |
127 |
formatter: wpsg_statistics_integer_format
|
2304 |
robert |
128 |
},
|
|
|
129 |
min:0,
|
|
|
130 |
max: <?php echo $this->view['chart']['data']['y2max']; ?>,
|
2116 |
robert |
131 |
}
|
|
|
132 |
},
|
|
|
133 |
highlighter: { show: false }
|
|
|
134 |
});
|
|
|
135 |
|
2307 |
robert |
136 |
var data = [<?php echo $pieChartJS['sales']; ?>];
|
2116 |
robert |
137 |
|
2307 |
robert |
138 |
var charttopsellertosalesPieSales = jQuery.jqplot ('charttopsellertosales-pie-sales', [data],
|
2116 |
robert |
139 |
{
|
|
|
140 |
seriesDefaults: {
|
|
|
141 |
renderer: jQuery.jqplot.PieRenderer,
|
|
|
142 |
rendererOptions: { padding: 50, sliceMargin: 4, showDataLabels: true }
|
|
|
143 |
},
|
|
|
144 |
legend: { show:true, location: 'e' }
|
|
|
145 |
}
|
|
|
146 |
);
|
2307 |
robert |
147 |
|
|
|
148 |
var data = [<?php echo $pieChartJS['amount']; ?>];
|
|
|
149 |
|
|
|
150 |
var charttopsellertosalesPieAmount = jQuery.jqplot ('charttopsellertosales-pie-amount', [data],
|
|
|
151 |
{
|
|
|
152 |
seriesDefaults: {
|
|
|
153 |
renderer: jQuery.jqplot.PieRenderer,
|
|
|
154 |
rendererOptions: { padding: 50, sliceMargin: 4, showDataLabels: true }
|
|
|
155 |
},
|
|
|
156 |
legend: { show:true, location: 'e' }
|
|
|
157 |
}
|
|
|
158 |
);
|
2116 |
robert |
159 |
|
|
|
160 |
wpsg_statistic_addExportButton();
|
|
|
161 |
|
|
|
162 |
});
|
|
|
163 |
</script>
|
|
|
164 |
|
2304 |
robert |
165 |
<style type="text/css">
|
|
|
166 |
.jqplot-x2axis { display:none; }
|
|
|
167 |
</style>
|
|
|
168 |
|
2116 |
robert |
169 |
<?php } else { ?>
|
|
|
170 |
<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
|
|
|
171 |
<?php } ?>
|