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