diff options
Diffstat (limited to 'modules/ViewDataTable')
-rw-r--r-- | modules/ViewDataTable/Cloud.php | 34 | ||||
-rw-r--r-- | modules/ViewDataTable/GenerateGraphData.php | 106 | ||||
-rw-r--r-- | modules/ViewDataTable/Graph.php | 86 |
3 files changed, 113 insertions, 113 deletions
diff --git a/modules/ViewDataTable/Cloud.php b/modules/ViewDataTable/Cloud.php index fbb831301d..3764b8d2fa 100644 --- a/modules/ViewDataTable/Cloud.php +++ b/modules/ViewDataTable/Cloud.php @@ -1,22 +1,22 @@ -<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- * @package Piwik_ViewDataTable
- */
-
-require_once "Visualization/Cloud.php";
-
-/**
+<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * @package Piwik_ViewDataTable + */ + +require_once "Visualization/Cloud.php"; + +/** * Reads the requested DataTable from the API, and prepares the data to give * to Piwik_Visualization_Cloud that will display the tag cloud (via the template cloud.tpl). - *
- * @package Piwik_ViewDataTable
- *
+ * + * @package Piwik_ViewDataTable + * */ class Piwik_ViewDataTable_Cloud extends Piwik_ViewDataTable { diff --git a/modules/ViewDataTable/GenerateGraphData.php b/modules/ViewDataTable/GenerateGraphData.php index 09f1446371..03ea3f9b1e 100644 --- a/modules/ViewDataTable/GenerateGraphData.php +++ b/modules/ViewDataTable/GenerateGraphData.php @@ -1,15 +1,15 @@ -<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- * @package Piwik_ViewDataTable
- */
-
-/**
+<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * @package Piwik_ViewDataTable + */ + +/** * Reads data from the API and prepares data to give to the renderer Piwik_Visualization_Chart. * This class is used to generate the data for the FLASH charts. It is given as a parameter of the SWF file. * You can set the number of elements to appear in the graph using: setGraphLimit(); @@ -25,9 +25,9 @@ * return $this->renderView($view, $fetch); * } * </pre> - *
- * @package Piwik_ViewDataTable
- *
+ * + * @package Piwik_ViewDataTable + * */ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable { @@ -47,29 +47,29 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable * Number of elements to display in the graph. * * @var int - */
- protected $graphLimit = 5;
+ */ + protected $graphLimit = 5; /** * Sets the number max of elements to display (number of pie slice, vertical bars, etc.) * If the data has more elements than $limit then the last part of the data will be the sum of all the remaining data. * * @param int $limit - */
- function setGraphLimit( $limit )
- {
- $this->graphLimit = $limit;
- }
+ */ + function setGraphLimit( $limit ) + { + $this->graphLimit = $limit; + } /** * Returns numbers of elemnts to display in the graph * * @return int - */
- function getGraphLimit()
- {
- return $this->graphLimit;
+ */ + function getGraphLimit() + { + return $this->graphLimit; } -
+ public function main() { if($this->mainAlreadyExecuted) @@ -77,12 +77,12 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable return; } $this->mainAlreadyExecuted = true; -
+ $this->setLimit(-1); -
- // we load the data with the filters applied
+ + // we load the data with the filters applied $this->loadDataTableFromAPI(); - $this->dataTable->queueFilter('Piwik_DataTable_Filter_AddSummaryRow',array($this->getGraphLimit()));
+ $this->dataTable->queueFilter('Piwik_DataTable_Filter_AddSummaryRow',array($this->getGraphLimit())); // echo $this->dataTable; $this->dataAvailable = $this->dataTable->getRowsCount() != 0; @@ -133,7 +133,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable // var_dump($data);exit; return $data; } -}
+} /** * Piwik_ViewDataTable_GenerateGraphData for the Evolution graph (eg. Last 30 days visits) using Piwik_Visualization_ChartEvolution @@ -161,26 +161,26 @@ class Piwik_ViewDataTable_GenerateGraphData_ChartEvolution extends Piwik_ViewDat * * @package Piwik_ViewDataTable * - */
-class Piwik_ViewDataTable_GenerateGraphData_ChartPie extends Piwik_ViewDataTable_GenerateGraphData
-{
- function __construct()
- {
- require_once "Visualization/ChartPie.php";
- $this->view = new Piwik_Visualization_ChartPie;
- }
-}
+ */ +class Piwik_ViewDataTable_GenerateGraphData_ChartPie extends Piwik_ViewDataTable_GenerateGraphData +{ + function __construct() + { + require_once "Visualization/ChartPie.php"; + $this->view = new Piwik_Visualization_ChartPie; + } +} /** - * Piwik_ViewDataTable_GenerateGraphData for the vertical bar graph, using Piwik_Visualization_ChartVerticalBar
- *
- * @package Piwik_ViewDataTable
- *
- */
-class Piwik_ViewDataTable_GenerateGraphData_ChartVerticalBar extends Piwik_ViewDataTable_GenerateGraphData
-{
- function __construct()
- {
- require_once "Visualization/ChartVerticalBar.php";
- $this->view = new Piwik_Visualization_ChartVerticalBar;
- }
+ * Piwik_ViewDataTable_GenerateGraphData for the vertical bar graph, using Piwik_Visualization_ChartVerticalBar + * + * @package Piwik_ViewDataTable + * + */ +class Piwik_ViewDataTable_GenerateGraphData_ChartVerticalBar extends Piwik_ViewDataTable_GenerateGraphData +{ + function __construct() + { + require_once "Visualization/ChartVerticalBar.php"; + $this->view = new Piwik_Visualization_ChartVerticalBar; + } } diff --git a/modules/ViewDataTable/Graph.php b/modules/ViewDataTable/Graph.php index debad0edd6..c96f465aa5 100644 --- a/modules/ViewDataTable/Graph.php +++ b/modules/ViewDataTable/Graph.php @@ -1,20 +1,20 @@ -<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- * @package Piwik_ViewDataTable
- */
-
-/**
+<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * @package Piwik_ViewDataTable + */ + +/** * This class generates the HTML code to embed to flash graphs in the page. * It doesn't call the API but simply prints the html snippet. - *
- * @package Piwik_ViewDataTable
- *
+ * + * @package Piwik_ViewDataTable + * */ abstract class Piwik_ViewDataTable_Graph extends Piwik_ViewDataTable { @@ -74,7 +74,7 @@ abstract class Piwik_ViewDataTable_Graph extends Piwik_ViewDataTable $this->id = $this->getUniqIdTable(); $view->graphType = $this->graphType; - $this->parametersToModify['action'] = $this->currentControllerAction;
+ $this->parametersToModify['action'] = $this->currentControllerAction; $url = Piwik_Url::getCurrentQueryStringWithParametersModified($this->parametersToModify); $view->jsInvocationTag = $this->getFlashInvocationCode($url); $view->urlData = $url; @@ -87,7 +87,7 @@ abstract class Piwik_ViewDataTable_Graph extends Piwik_ViewDataTable $view->javascriptVariablesToSet = $this->getJavascriptVariablesToSet(); $view->showFooter = $this->getShowFooter(); $this->view = $view; - }
+ } protected function getFlashInvocationCode( $url = 'libs/open-flash-chart/data-files/nodata.txt', $use_swfobject = true ) { @@ -165,32 +165,32 @@ class Piwik_ViewDataTable_Graph_ChartEvolution extends Piwik_ViewDataTable_Graph $this->setParametersToModify(array('date' => 'last30')); $this->doNotShowFooter(); } -}
-/**
+} +/** * Generates HTML embed for the Pie chart - *
- * @package Piwik_ViewDataTable
- *
- */
-class Piwik_ViewDataTable_Graph_ChartPie extends Piwik_ViewDataTable_Graph
-{
- function __construct()
- {
- $this->valueParameterViewDataTable = 'generateDataChartPie';
- }
-}
-
-/**
+ * + * @package Piwik_ViewDataTable + * + */ +class Piwik_ViewDataTable_Graph_ChartPie extends Piwik_ViewDataTable_Graph +{ + function __construct() + { + $this->valueParameterViewDataTable = 'generateDataChartPie'; + } +} + +/** * * Generates HTML embed for the vertical bar chart - *
- * @package Piwik_ViewDataTable
- *
- */
-class Piwik_ViewDataTable_Graph_ChartVerticalBar extends Piwik_ViewDataTable_Graph
-{
- function __construct()
- {
- $this->valueParameterViewDataTable = 'generateDataChartVerticalBar';
- }
-}
+ * + * @package Piwik_ViewDataTable + * + */ +class Piwik_ViewDataTable_Graph_ChartVerticalBar extends Piwik_ViewDataTable_Graph +{ + function __construct() + { + $this->valueParameterViewDataTable = 'generateDataChartVerticalBar'; + } +} |