PHPOffice / PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files
https://phpspreadsheet.readthedocs.io
MIT License
13.29k stars 3.44k forks source link

Rendered charts from .xlsx file dont look like original charts. There is even a chart missing. #3783

Open flyke opened 10 months ago

flyke commented 10 months ago

This is:

- [* ] 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?

When I have a spreadsheet with charts, and I write it to html or PDF, I expect the the charts in the html or PDF to be like the charts in the source spreadsheet

What is the current behavior?

In the rendered html/pdf:

What are the steps to reproduce?

What features do you think are causing the issue

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

This issue is now only for XLSX files. I have a very comparable XLS file, but that does not render any chart, so thats a different issue altogether.

Which versions of PhpSpreadsheet and PHP are affected?

oleibman commented 10 months ago

Thank you for the sample file and the screenshots. The missing chart is a bug in PhpSpreadsheet which I will investigate. The renderer uses its own palette. We do not pass any color information to it, and, even if we did, it could not use it. I believe the rotation falls into the same category. I will ask the vendor. My html output has a different problem than yours, which is a bit strange. My charts are cut off because the renderer creates the charts a little bigger than the spreadsheet, so they overlay each other in the html. I am not sure how I can tell what size the charts are in the spreadsheet, and, even if I knew that, I am not sure if I can pass that information to the renderer. I will ask the vendor.