diff --git a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php index b66e334ee0aa86210264101cd352963995edeea8..fc4d9246cfb5fcfa9111ab0e6fbd7720f829fae4 100644 --- a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php +++ b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php @@ -313,8 +313,8 @@ class Piwik_ViewDataTable_GenerateGraphData_ChartEvolution extends Piwik_ViewDat private function getXAxisStepSize( $periodLabel, $countGraphElements ) { - // For Custom Date Range, when the number of elements plotted can be small, make sure the X legend is useful - if ($countGraphElements <= 3) + // when the number of elements plotted can be small, make sure the X legend is useful + if ($countGraphElements <= 7) { return 1; } @@ -322,44 +322,16 @@ class Piwik_ViewDataTable_GenerateGraphData_ChartEvolution extends Piwik_ViewDat switch ($periodLabel) { case 'day': - if ($countGraphElements <= 9) - { - $steps = 4; - } - else - { $steps = 5; - } break; case 'week': - if ($countGraphElements <= 4) - { - return 2; - } - else - { $steps = 4; - } break; case 'month': - if ($countGraphElements <= 6) - { - return 2; - } - else - { $steps = 5; - } break; case 'year': - if ($countGraphElements <= 10) - { - return 2; - } - else - { $steps = 5; - } break; default: $steps = 5; diff --git a/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php b/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php index 4209b78fca18de906df8e694cb7135feff2d0774..03244b842607be46333b8ef4c6150763b51708b5 100644 --- a/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php +++ b/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php @@ -178,7 +178,7 @@ class Piwik_ViewDataTable_GenerateGraphHTML_ChartEvolution extends Piwik_ViewDat case 'week': return 26; case 'month': - return 12; + return 24; case 'year': return 5; case 'day': diff --git a/lang/en.php b/lang/en.php index a3cf6fc6de21349657680e825537e9d6a9f0e0ac..c346bac8c7a625c535aa4f1b631033d681b75323 100644 --- a/lang/en.php +++ b/lang/en.php @@ -1588,7 +1588,6 @@ And thank you for using Piwik!', 'VisitsSummary_MaxNbActions' => '%s max actions in one visit', 'VisitsSummary_NbActionsPerVisit' => '%s actions (page views, downloads and outlinks) per visit', 'VisitsSummary_NbVisitsBounced' => '%s visits have bounced (left the website after one page)', - 'VisitsSummary_EvolutionOverLastPeriods' => 'Evolution over the last %s %s', 'VisitsSummary_GenerateTime' => '%s seconds to generate the page', 'VisitsSummary_GenerateQueries' => '%s queries executed', 'VisitsSummary_WidgetLastVisits' => 'Visits Over Time', diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php index 99efec780bebb7b3477b2265e064fbc954618a81..aeff3418772ec653a9554d0a5dbdd68d2ded8618 100644 --- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php +++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php @@ -182,7 +182,11 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution $view = Piwik_ViewDataTable::factory($this->graphType); $view->setDataTable($this->dataTable); $view->init('CoreHome', 'getRowEvolutionGraph', $this->apiMethod); - $view->setColumnsToDisplay(array_keys($this->graphMetrics)); + + if(!empty($this->graphMetrics)) // In row Evolution popover, this is empty + { + $view->setColumnsToDisplay(array_keys($this->graphMetrics)); + } $view->hideAllViewsIcons(); foreach ($this->availableMetrics as $metric => $metadata) diff --git a/plugins/VisitsSummary/templates/index.tpl b/plugins/VisitsSummary/templates/index.tpl index b1b149b9bb09da72e2fa67c5ce17c5d12dddae66..43c7097911e1ba92a873d775e03b2ac6ac53491b 100644 --- a/plugins/VisitsSummary/templates/index.tpl +++ b/plugins/VisitsSummary/templates/index.tpl @@ -1,9 +1,8 @@ {* This graphId must be unique for this report *} <a name="evolutionGraph" graphId="VisitsSummarygetEvolutionGraph"></a> -<h2>{if $period=='range'}{'Referers_Evolution'|translate} - {else}{'VisitsSummary_EvolutionOverLastPeriods'|translate:'30':$periodsNames.$period.plural}{/if} -</h2> +<h2>{'Referers_Evolution'|translate}</h2> + {$graphEvolutionVisitsSummary} <h2>{'General_Report'|translate}</h2>