Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2113 robert 1
<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
2
 
3
<?php
4
 
5
	if (wpsg_isSizedArray($this->view['chart']['data']['records'])) {
6
 
7
		$i = 0;
8
		$j = 0;
9
 
10
		foreach ($this->view['chart']['data']['records'] as $data)
11
		{
12
 
13
			$series = "{";
14
 
15
			if (isset($this->view['chart']['data']['label']))
16
			{
17
				$series .= "label:'".$this->view['chart']['data']['label'].' '.$data['year']."',";
18
			}
19
			else
20
			{
2403 robert 21
				$series .= "label:'".date_i18n('F', strtotime($data['day'].'.'.$data['month'].'.'.$data['year'])).' '.$data['year']."', ";
2113 robert 22
			}
23
 
24
			$series .= "	highlighter: {";
25
 
26
			$series .= "		formatString: '<table><tr><td>%s ".$data['month']." ".$data['year'].", %s. ".$this->get_option('wpsg_currency')."</td></tr></table>'";
27
 
28
			$series .= "	}";
29
 
30
			$series .= "}";
31
 
32
			if (!in_array($series, (array)$chartJS['legend']) || !isset($chartJS['legend'][$i]))
33
			{
34
				$chartJS['legend'][$i] = $series;
35
			}
36
 
37
		  	$chartJS['year'] .= "['".$data['year'].'/'.$data['month'].'/'."1"."', ".wpsg_hspc($data['total'])."], ";
38
 
39
		  	if ($j == count($this->view['chart']['data']['records']) - 1) {
40
		  		$chartJS['year'] = 'var year = ['.substr($chartJS['year'], 0, -2).'];';
41
		  	}
42
 
43
		  	$j++;
44
 
45
		}
46
 
47
	}
48
?>
49
 
50
<?php if ($chartJS['year'] != '') { ?>
2335 robert 51
<div id="chartannualturnover-line" style="height:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_height'); ?>px; width:<?php echo $this->get_option('wpsg_mod_statistics_line_chart_width'); ?>px;"></div>
2113 robert 52
 
2350 robert 53
<br />
54
 
55
<div id="table-data">
56
	<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?>
57
</div>
58
 
59
<div class="wpsg_clearer"></div>
60
 
2113 robert 61
<script type="text/javascript">
62
 
63
function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
64
    // display series_label, x-axis_tick, y-axis value
65
    return plot.series[seriesIndex]["label"] + ", " + plot.data[seriesIndex][pointIndex];
66
}
67
 
68
 
69
jQuery(document).ready(function(){
70
	  <?php echo $chartJS['year']; ?>
71
 
72
	  var chartannualturnoverLine = jQuery.jqplot('chartannualturnover-line', [year], {
73
		  animate: true,
74
		  axesDefaults: {
75
	            labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
76
		  },
77
		  series:[
78
          		<?php echo implode(', ', $chartJS['legend']); ?>
79
          ],
80
          legend: {
81
            show: true,
2304 robert 82
            placement: 'outside'
2113 robert 83
          },
84
	      axes:{
85
	        xaxis:{
86
	          	renderer:jQuery.jqplot.DateAxisRenderer,
87
	          	label:'<?php echo wpsg_hspc($this->view['chart']['info']['xaxis']['label']); ?>',
88
	          	tickOptions:{formatString:'%b'},
89
	          	tickInterval: '1 month',
90
	          	min:'<?php echo date('Y', $this->view['chart']['data']['min']); ?>/<?php echo date('m', $this->view['chart']['data']['min']); ?>/<?php echo date('d', $this->view['chart']['data']['min']); ?>',
91
	          	max:'<?php echo date('Y', $this->view['chart']['data']['max']); ?>/<?php echo date('m', $this->view['chart']['data']['max']); ?>/<?php echo date('d', $this->view['chart']['data']['max']); ?>'
92
	        },
93
	        yaxis:{
94
                label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
95
                tickOptions: {
96
                	formatter: wpsg_statistics_number_format
97
            	},
98
        		min:0
99
            }
100
	      },
101
	      highlighter: {
102
	            show: true
103
	      }
104
	  });
105
 
106
	  wpsg_statistic_addExportButton();
107
 
108
});
109
</script>
110
<?php } else { ?>
111
<?php echo __('Keine Daten zur Auswertung vorhanden.', 'wpsg'); ?>
112
<?php } ?>