/** Generic method to get an evolution graph or a sparkline for the row evolution popover */ public function getRowEvolutionGraph($fetch = false) { $rowEvolution = self::$rowEvolutionCache; if ($rowEvolution === null) { $paramName = Piwik_CoreHome_DataTableRowAction_MultiRowEvolution::IS_MULTI_EVOLUTION_PARAM; $isMultiRowEvolution = Piwik_Common::getRequestVar($paramName, false, 'int'); $rowEvolution = $this->makeRowEvolution($isMultiRowEvolution, $graphType = 'graphEvolution'); self::$rowEvolutionCache = $rowEvolution; } $view = $rowEvolution->getRowEvolutionGraph(); return $this->renderView($view, $fetch); }
/** Render the entire row evolution popover for multiple rows */ public function getMultiRowEvolutionPopover() { $rowEvolution = new Piwik_CoreHome_DataTableRowAction_MultiRowEvolution($this->idSite, $this->date); self::$rowEvolutionCache = $rowEvolution; $view = Piwik_View::factory('popover_multirowevolution'); echo $rowEvolution->renderPopover($this, $view); }