示例#1
0
 /**
  * Render the popover
  * @param Piwik_CoreHome_Controller
  * @param Piwik_View (the popover_rowevolution template)
  */
 public function renderPopover($controller, $view)
 {
     // add data for metric select box
     $view->availableMetrics = $this->metricsForSelect;
     $view->selectedMetric = $this->metric;
     $view->availableRecordsText = $this->dimension . ': ' . Piwik_Translate('RowEvolution_ComparingRecords', array(count($this->availableMetrics)));
     return parent::renderPopover($controller, $view);
 }
示例#2
0
 /** Render the entire row evolution popover for a single row */
 public function getRowEvolutionPopover()
 {
     $rowEvolution = new Piwik_CoreHome_DataTableRowAction_RowEvolution($this->idSite, $this->date);
     self::$rowEvolutionCache = $rowEvolution;
     $view = Piwik_View::factory('popover_rowevolution');
     echo $rowEvolution->renderPopover($this, $view);
 }
 /**
  * Generic method to get an evolution graph or a sparkline for the row evolution popover.
  * Do as much as possible from outside the controller.
  * @return Piwik_ViewDataTable
  */
 public function getRowEvolutionGraph()
 {
     $view = parent::getRowEvolutionGraph();
     $view->setCustomParameter(self::IS_MULTI_EVOLUTION_PARAM, true);
     return $view;
 }