From ad405c7045c6e242080ec9d3ce4c9e586b517c4f Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Thu, 14 Jan 2016 14:55:36 +0000 Subject: - Testweise 4 git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5261 0d5edaf7-2b12-4e95-93f4-047927463d4b --- .../mod_statistics/chartturnoverperhour/all.phtml | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 views/mods/mod_statistics/chartturnoverperhour/all.phtml (limited to 'views/mods/mod_statistics/chartturnoverperhour/all.phtml') diff --git a/views/mods/mod_statistics/chartturnoverperhour/all.phtml b/views/mods/mod_statistics/chartturnoverperhour/all.phtml new file mode 100644 index 0000000..1698126 --- /dev/null +++ b/views/mods/mod_statistics/chartturnoverperhour/all.phtml @@ -0,0 +1,117 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +view['chart']['data'])) + { + + for ($i = 0; $i < count($this->view['chart']['data']); $i++) + { + + $chartJS['legend'][$i] = "{"; + + if (isset($this->view['chart']['data'][$i]['label'])) + { + $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',"; + } + + $chartJS['legend'][$i] .= " highlighter: {"; + + $chartJS['legend'][$i] .= " formatString: '
%s Uhr, %s ".$this->get_option('wpsg_currency')."
'"; + + $chartJS['legend'][$i] .= " }"; + + $chartJS['legend'][$i] .= "}"; + + $j = 0; + + foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record) + { + //immer das Datum vom Rootelement nutzen + $k = 0 ; + + foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord) + { + if ($j == $k) + { + //if (mktime($record['hour'], 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(date('H'), 0, 0, date('m'), date('d'), date('Y'))) + //{ + $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']." ".$rrecord['hour'].":00:00', ".wpsg_hspc($record['total'])."]"; + //} + } + $k++; + } + + if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { + $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']'; + } + + $j++; + } + + } + + } + +?> + + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnoverperhour/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3