Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulienMoumne <julien@piwik.org>2012-09-05 01:44:26 +0400
committerJulienMoumne <julien@piwik.org>2012-09-05 01:44:26 +0400
commit7c4c6dde27bac0b452f0f7720c2235dace6f7031 (patch)
treecdfa8a52fa16c5f83c9e22091d754b5f35baa3a7 /core/ReportRenderer/Pdf.php
parent61cf7ee40cbe4aa68f4268738d5d7a5e4b0426fb (diff)
refs #3013
* plot multiple metrics using $columns (renamed from $column) * plot row evolutions using optional $labels, will plot top 5 labels when omitted * imageGraphEvolutionUrl added to report metadata (only for reports without constant row count and Referers.getRefererType) * $showMetricTitle renamed to $showLegend refs #3014 * new report parameter 'Show Historical Graphs for the top 5 values' * better looking evolution graph on landcape pages refs #3158 * $label is now optional, will return top N=filter_limit row evolutions sorted with filter_sort_column when omitted * support for $idGoal * integration tests updated constantRowsCount set on * Goals_getDaysToConversion * Goals_getVisitsUntilConversion * Referers_getRefererType merges * r6874 IDEA * in Piwik UI, add a link 'display top 10 row evolutions' using API.getRowEvolution &label=false&filter_sort_column=xyz&filter_limit=10 TODO * fix scheduled report integration tests * review @reviews git-svn-id: http://dev.piwik.org/svn/trunk@6918 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/ReportRenderer/Pdf.php')
-rw-r--r--core/ReportRenderer/Pdf.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php
index 51ef108e06..40bcf94ad7 100644
--- a/core/ReportRenderer/Pdf.php
+++ b/core/ReportRenderer/Pdf.php
@@ -66,6 +66,7 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
private $report;
private $reportMetadata;
private $displayGraph;
+ private $evolutionGraph;
private $displayTable;
private $reportColumns;
private $reportRowsMetadata;
@@ -274,6 +275,7 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
$this->reportMetadata = $processedReport['metadata'];
$this->reportRowsMetadata = $processedReport['reportMetadata'];
$this->displayGraph = $processedReport['displayGraph'];
+ $this->evolutionGraph = $processedReport['evolutionGraph'];
$this->displayTable = $processedReport['displayTable'];
list($this->report, $this->reportColumns) = self::processTableFormat($this->reportMetadata, $processedReport['reportData'], $processedReport['columns']);
@@ -403,10 +405,15 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
} else {
$imageWidth = self::IMAGE_GRAPH_WIDTH_LANDSCAPE;
$imageHeight = self::IMAGE_GRAPH_HEIGHT_LANDSCAPE;
+
+ // evolution graphs in landscape are better looking if they have the same height as in portrait
+ if(empty($this->reportMetadata['dimension']) || ($this->evolutionGraph && !empty($this->reportMetadata['imageGraphEvolutionUrl'])))
+ {
+ $imageHeight = self::IMAGE_GRAPH_HEIGHT_PORTRAIT;
+ }
}
- $imageGraphUrl = $this->reportMetadata['imageGraphUrl'];
- $imageGraph = parent::getStaticGraph($imageGraphUrl, $imageWidth, $imageHeight);
+ $imageGraph = parent::getStaticGraph($this->reportMetadata, $imageWidth, $imageHeight, $this->evolutionGraph);
$this->TCPDF->Image(
'@'.$imageGraph,