public function PHPExcel_Worksheet::getChartByIndex in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php \PHPExcel_Worksheet::getChartByIndex()
Get a chart by its index position
Parameters
string $index Chart index position:
Return value
false|PHPExcel_Chart
Throws
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet.php, line 606
Class
- PHPExcel_Worksheet
- PHPExcel_Worksheet
Code
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];
}