Piwik\Plugin\Controller::getLastUnitGraph PHP Method

getLastUnitGraph() protected method

Returns a ViewDataTable object that will render a jqPlot evolution graph for the last30 days/weeks/etc. of the current period, relative to the current date.
protected getLastUnitGraph ( string $currentModuleName, string $currentControllerAction, string $apiMethod ) : ViewDataTable
$currentModuleName string The name of the current plugin.
$currentControllerAction string The name of the action that renders the desired report.
$apiMethod string The API method that the ViewDataTable will use to get graph data.
return ViewDataTable
    protected function getLastUnitGraph($currentModuleName, $currentControllerAction, $apiMethod)
    {
        $view = ViewDataTableFactory::build(Evolution::ID, $apiMethod, $currentModuleName . '.' . $currentControllerAction, $forceDefault = true);
        $view->config->show_goals = false;
        return $view;
    }