diff options
author | sgiehl <stefan@piwik.org> | 2015-10-11 01:24:48 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-10-11 15:46:01 +0300 |
commit | b33917db3c6b46841e98482863a48ab86e67b994 (patch) | |
tree | 47c4741c30189ac6a897603ff29f53f9db0ee1ea /plugins/CoreHome/DataTableRowAction | |
parent | d19db820fe46ac84f7bb6e348b50698cafe15e26 (diff) |
use number formats for row evolution popover
Diffstat (limited to 'plugins/CoreHome/DataTableRowAction')
-rw-r--r-- | plugins/CoreHome/DataTableRowAction/RowEvolution.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php index 9b80f92c87..d73c5c2158 100644 --- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php +++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php @@ -15,6 +15,7 @@ use Piwik\Common; use Piwik\DataTable; use Piwik\Date; use Piwik\Metrics; +use Piwik\NumberFormatter; use Piwik\Period\Factory as PeriodFactory; use Piwik\Piwik; use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution as EvolutionViz; @@ -231,7 +232,10 @@ class RowEvolution $change = isset($metricData['change']) ? $metricData['change'] : false; list($first, $last) = $this->getFirstAndLastDataPointsForMetric($metric); - $details = Piwik::translate('RowEvolution_MetricBetweenText', array($first, $last)); + $details = Piwik::translate('RowEvolution_MetricBetweenText', array( + NumberFormatter::getInstance()->format($first), + NumberFormatter::getInstance()->format($last) + )); if ($change !== false) { $lowerIsBetter = Metrics::isLowerValueBetter($metric); @@ -258,7 +262,11 @@ class RowEvolution $min = isset($metricData['min']) ? $metricData['min'] : 0; $min .= $unit; $max .= $unit; - $minmax = Piwik::translate('RowEvolution_MetricMinMax', array($metricData['name'], $min, $max)); + $minmax = Piwik::translate('RowEvolution_MetricMinMax', array( + $metricData['name'], + NumberFormatter::getInstance()->formatNumber($min), + NumberFormatter::getInstance()->formatNumber($max) + )); $newMetric = array( 'label' => $metricData['name'], |