public function getChartByName($chartName = '')
    {
        $chartCount = count($this->chartCollection);
        if ($chartCount == 0) {
            return false;
        }
        foreach ($this->chartCollection as $index => $chart) {
            if ($chart->getName() == $chartName) {
                return $this->chartCollection[$index];
            }
        }
        return false;
    }
public function getChartByName($chartName = '')
    {
        $chartCount = count($this->chartCollection);
        if ($chartCount == 0) {
            return false;
        }
        foreach ($this->chartCollection as $index => $chart) {
            if ($chart->getName() == $chartName) {
                return $this->chartCollection[$index];
            }
        }
        return false;
    }
public function getChartByName ( $ chartName = '' ) { $ chartCount = count ( $ this -> chartCollection ) ; if ( $ chartCount == 0 ) { return false ; } foreach ( $ this -> chartCollection as $ index => $ chart ) { if ( $ chart -> getName ( ) == $ chartName ) { return $ this -> chartCollection [ $ index ] ; } } return false ; }
Get a chart by name

@param string $chartName Chart name
@return false|PHPExcel_Chart
@throws PHPExcel_Exception
Get a chart by name