diff options
Diffstat (limited to 'views/mods/mod_statistics/chartturnoverperhour/all.phtml')
| -rw-r--r-- | views/mods/mod_statistics/chartturnoverperhour/all.phtml | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/views/mods/mod_statistics/chartturnoverperhour/all.phtml b/views/mods/mod_statistics/chartturnoverperhour/all.phtml index 1698126..a7d96c2 100644 --- a/views/mods/mod_statistics/chartturnoverperhour/all.phtml +++ b/views/mods/mod_statistics/chartturnoverperhour/all.phtml @@ -25,29 +25,34 @@ $j = 0;
- foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
+ if (wpsg_isSizedArray($this->view['chart']['data'][$i]))
{
- //immer das Datum vom Rootelement nutzen
- $k = 0 ;
- foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
+ foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
{
- 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++;
+ //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++;
}
- if ($j == count($this->view['chart']['data'][$i]['records']) - 1) {
- $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']';
- }
-
- $j++;
- }
+ }
}
|
