public function getChartByIndex($index = null)
    {
        $chartCount = count($this->chartCollection);
        if ($chartCount == 0) {
            return false;
        }
        if (is_null($index)) {
            $index = --$chartCount;
        }
        if (!isset($this->chartCollection[$index])) {
            return false;
        }

        return $this->chartCollection[$index];
    }
public function getChartByIndex($index = null)
    {
        $chartCount = count($this->chartCollection);
        if ($chartCount == 0) {
            return false;
        }
        if (is_null($index)) {
            $index = --$chartCount;
        }
        if (!isset($this->chartCollection[$index])) {
            return false;
        }

        return $this->chartCollection[$index];
    }
public function getChartByIndex ( $ index = null ) { $ chartCount = count ( $ this -> chartCollection ) ; if ( $ chartCount == 0 ) { return false ; } if ( is_null ( $ index ) ) { $ index = -- $ chartCount ; } if ( ! isset ( $ this -> chartCollection [ $ index ] ) ) { return false ; } return $ this -> chartCollection [ $ index ] ; }
Get a chart by its index position

@param string $index Chart index position
@return false|PHPExcel_Chart
@throws PHPExcel_Exception
Get a chart by its index position