Closed ivangy closed 2 years ago
Unfortunately, jpgraph is not maintained in composer. So the version that is installed "out of the box" with PhpSpreadsheet is a very old one, and results in the problem you are reporting. If you download the current version of jpgraph (4.4), and substitute that version in the vendor library, the sample scripts run correctly, without error or warnings messages. On my system, I discarded everything below vendor/jpgraph/jpgraph/lib/jpgraph (directory docs, directory src, and file VERSION), replacing them with docs, src, and VERSION from the current jpgraph image.
thank you! <3
We can now use mitoteam/jpgraph, which is maintained in Composer, in place of jpgraph/jpgraph. Closing this issue.
This is:
What is the expected behavior?
The pdf and html file with the charts
What is the current behavior?
32 Chart read write HTML 15:13:01 Load Test from Xlsx file 36writeLineChart1.xlsx 15:13:01 Iterate worksheets looking at the charts 15:13:01 Worksheet: Data 15:13:01 chart1 - "Sales" 15:13:01 15:13:01 lineChart Fatal error: Uncaught TypeError: JpGraphException::defaultHandler(): Argument #1 ($exception) must be of type Exception, Error given in C:\xampp.8.0.18\htdocs\phpexcel\vendor\jpgraph\jpgraph\lib\jpgraph\src\jpgraph_errhandler.inc.php:158 Stack trace: #0 [internal function]: JpGraphException::defaultHandler(Object(Error)) #1 {main} thrown in C:\xampp.8.0.18\htdocs\phpexcel\vendor\jpgraph\jpgraph\lib\jpgraph\src\jpgraph_errhandler.inc.php on line 158
32 Chart read write PDF 15:07:46 Load Test from Xlsx file 36writeLineChart1.xlsx 15:07:46 Iterate worksheets looking at the charts 15:07:46 Worksheet: Data 15:07:46 chart1 - "Sales" 15:07:46 15:07:46 lineChart Fatal error: Uncaught TypeError: JpGraphException::defaultHandler(): Argument #1 ($exception) must be of type Exception, Error given in C:\xampp.8.0.18\htdocs\phpexcel\vendor\jpgraph\jpgraph\lib\jpgraph\src\jpgraph_errhandler.inc.php:158 Stack trace: #0 [internal function]: JpGraphException::defaultHandler(Object(Error)) #1 {main} thrown in C:\xampp.8.0.18\htdocs\phpexcel\vendor\jpgraph\jpgraph\lib\jpgraph\src\jpgraph_errhandler.inc.php on line 158
What are the steps to reproduce?
Run 32_Chart_read_write_HTML.php Run 32_Chart_read_write_PDF.php
What features do you think are causing the issue
php8.0 "phpoffice/phpspreadsheet": "^1.23", "mpdf/mpdf": "^8.1", "dompdf/dompdf": "^1.2", "tecnickcom/tcpdf": "^6.4", "jpgraph/jpgraph": "^4.0"