本文整理汇总了PHP中Piwik_ViewDataTable::getColumnsToDisplay方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_ViewDataTable::getColumnsToDisplay方法的具体用法?PHP Piwik_ViewDataTable::getColumnsToDisplay怎么用?PHP Piwik_ViewDataTable::getColumnsToDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik_ViewDataTable
的用法示例。
在下文中一共展示了Piwik_ViewDataTable::getColumnsToDisplay方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initChartObjectData
protected function initChartObjectData()
{
$this->dataTable->applyQueuedFilters();
// We apply a filter to the DataTable, decoding the label column (useful for keywords for example)
$this->dataTable->filter('ColumnCallbackReplace', array('label', 'urldecode'));
$xLabels = $this->dataTable->getColumn('label');
$columnNames = parent::getColumnsToDisplay();
if (($labelColumnFound = array_search('label', $columnNames)) !== false) {
unset($columnNames[$labelColumnFound]);
}
$columnNameToTranslation = $columnNameToValue = array();
foreach ($columnNames as $columnName) {
$columnNameToTranslation[$columnName] = $this->getColumnTranslation($columnName);
$columnNameToValue[$columnName] = $this->dataTable->getColumn($columnName);
}
$this->view->setAxisXLabels($xLabels);
$this->view->setAxisYValues($columnNameToValue);
$this->view->setAxisYLabels($columnNameToTranslation);
$this->view->setAxisYUnit($this->yAxisUnit);
$this->view->setDisplayPercentageInTooltip($this->displayPercentageInTooltip);
}
示例2: getColumnToDisplay
function getColumnToDisplay()
{
$columns = parent::getColumnsToDisplay();
// not label, but the first numeric column
return $columns[1];
}
示例3: initChartObjectData
protected function initChartObjectData()
{
$this->dataTable->applyQueuedFilters();
// We apply a filter to the DataTable, decoding the label column (useful for keywords for example)
$this->dataTable->filter('ColumnCallbackReplace', array('label', 'urldecode'));
$xLabels = $this->dataTable->getColumn('label');
$columnNames = parent::getColumnsToDisplay();
if (($labelColumnFound = array_search('label', $columnNames)) !== false) {
unset($columnNames[$labelColumnFound]);
}
$columnNameToTranslation = $columnNameToValue = array();
foreach ($columnNames as $columnName) {
$columnNameToTranslation[$columnName] = $this->getColumnTranslation($columnName);
$columnNameToValue[$columnName] = $this->dataTable->getColumn($columnName);
}
$this->view->setAxisXLabels($xLabels);
$this->view->setAxisYValues($columnNameToValue);
$this->view->setAxisYLabels($columnNameToTranslation);
$this->view->setAxisYUnit($this->yAxisUnit);
$this->view->setDisplayPercentageInTooltip($this->displayPercentageInTooltip);
// show_all_ticks is not real query param, it is set by GenerateGraphHTML.
if (Piwik_Common::getRequestVar('show_all_ticks', 0) == 1) {
$this->view->showAllTicks();
}
$units = $this->getUnitsForColumnsToDisplay();
$this->view->setAxisYUnits($units);
$this->addSeriesPickerToView();
}