### Examples
**Creating a ViewDataTable for a report**
method in MyPlugin\Controller
public function myReport()
{
$view = Factory::build('table', 'MyPlugin.myReport');
$view->config->show_limit_control = true;
$view->config->translations['myFancyMetric'] = "My Fancy Metric";
return $view->render();
}
**Displaying a report in another way**
method in MyPlugin\Controller
use the same data that's used in myReport() above, but transform it in some way before
displaying.
public function myReportShownDifferently()
{
$view = Factory::build('table', 'MyPlugin.myReport', 'MyPlugin.myReportShownDifferently');
$view->config->filters[] = array('MyMagicFilter', array('an arg', 'another arg'));
return $view->render();
}
**Force a report to be shown as a bar graph**
method in MyPlugin\Controller
force the myReport report to show as a bar graph if there is no viewDataTable query param,
even though it is configured to show as a table.
public function myReportShownAsABarGraph()
{
$view = Factory::build('graphVerticalBar', 'MyPlugin.myReport', 'MyPlugin.myReportShownAsABarGraph',
$forceDefault = true);
return $view->render();
}