Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart read write HTML and PDF #2783

Closed
1 of 8 tasks
ivangy opened this issue Apr 27, 2022 · 3 comments
Closed
1 of 8 tasks

Chart read write HTML and PDF #2783

ivangy opened this issue Apr 27, 2022 · 3 comments
Labels

Comments

@ivangy
Copy link

ivangy commented Apr 27, 2022

This is:

- [x] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

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

  • Reader
  • Writer
  • Styles
  • Data Validations
  • Formula Calulations
  • Charts
  • AutoFilter
  • Form Elements

php8.0
"phpoffice/phpspreadsheet": "^1.23",
"mpdf/mpdf": "^8.1",
"dompdf/dompdf": "^1.2",
"tecnickcom/tcpdf": "^6.4",
"jpgraph/jpgraph": "^4.0"

@oleibman
Copy link
Collaborator

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.

@ivangy
Copy link
Author

ivangy commented Apr 28, 2022

thank you! <3

@oleibman
Copy link
Collaborator

oleibman commented Sep 2, 2022

We can now use mitoteam/jpgraph, which is maintained in Composer, in place of jpgraph/jpgraph. Closing this issue.

@oleibman oleibman closed this as completed Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants