-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Bug: Setting fill color on line chart corrupts chart in XLSX writer. #589
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
tiagomalheiro
added a commit
to tiagomalheiro/PhpSpreadsheet
that referenced
this issue
May 31, 2019
tiagomalheiro
added a commit
to tiagomalheiro/PhpSpreadsheet
that referenced
this issue
May 31, 2019
tiagomalheiro
added a commit
to tiagomalheiro/PhpSpreadsheet
that referenced
this issue
Mar 17, 2021
tiagomalheiro
added a commit
to tiagomalheiro/PhpSpreadsheet
that referenced
this issue
Mar 17, 2021
5 tasks
tiagomalheiro
added a commit
to tiagomalheiro/PhpSpreadsheet
that referenced
this issue
Nov 1, 2021
PowerKiKi
pushed a commit
to tiagomalheiro/PhpSpreadsheet
that referenced
this issue
Nov 23, 2021
When the fill color property of `DataSeries.plotLabel` using a DataSeriesValues on a line chart is set, the XLSX file written is corrupted, and MSExcel2016 removes the drawing1.xml if forced open. This problem was already documented on issue PHPOffice#589 along with a possible solution. So all credits go to @madrussa. I am only submitting the PR. Fixes PHPOffice#589 Closes PHPOffice#1930
PowerKiKi
pushed a commit
that referenced
this issue
Nov 23, 2021
When the fill color property of `DataSeries.plotLabel` using a DataSeriesValues on a line chart is set, the XLSX file written is corrupted, and MSExcel2016 removes the drawing1.xml if forced open. This problem was already documented on issue #589 along with a possible solution. So all credits go to @madrussa. I am only submitting the PR. Fixes #589 Closes #1930
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When setting the fill color property on a data series within a line chart and exporting it using the XLSX writer the chart becomes corrupt. The XLSX Chart writer has a bug on line:
PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php
Line 1079 in 043327b
It should not add the
<c:spPr />
tag with colour properties here. It should add them to the<c:spPr />
tag generated for the line which occurs here:https://github.com/PHPOffice/PhpSpreadsheet/blob/develop/src/PhpSpreadsheet/Writer/Xlsx/Chart.php#L1140
My workaround is to use a custom writer and I applied my fixes as below:
Line 1079:
Line 1143:
This probably isn't the best solution though as I don't know what impact it has on other chart types yet. I only know if affects line charts.
The text was updated successfully, but these errors were encountered: