private function setBarWidth() { if (isset($this->barWidth)) { $this->realBarWidth = $this->barWidth; return; } $this->_setBarCount(); $totalGroups = KChartGoogleHelper::getMaxCountOfArray($this->_data); if ($this->isHoriz) { $chartSize = $this->_height - 50; } else { $chartSize = $this->_width - 50; } $chartSize -= $totalGroups * $this->_groupSpacerWidth; $this->realBarWidth = round($chartSize / $this->totalBars); }
/** * Set bar count */ protected function _setBarCount() { $this->totalBars = KChartGoogleHelper::getMaxCountOfArray($this->_data); }