Skip to content

Fix/chart axis titles#1760

Merged
MarkBaker merged 4 commits intoPHPOffice:masterfrom
hazybluedot:fix/ChartAxisTitles
Jan 31, 2021
Merged

Fix/chart axis titles#1760
MarkBaker merged 4 commits intoPHPOffice:masterfrom
hazybluedot:fix/ChartAxisTitles

Conversation

@hazybluedot
Copy link
Contributor

@hazybluedot hazybluedot commented Dec 20, 2020

…axisLabel or YaxisLabel

This is:

- [x] a bugfix
- [ ] a new feature

Checklist:

Why this change is needed?

For some Xlsx files when only a horizontal axis title was given it would map to a YAxisTitle. The reader was treating varAx as a title for only the YAxisTitle, but at least for scatter charts in Excel 2019, varAx is used for both the horizontal and vertical axis labels. This fix uses the axPos element to determine axis position, bottom and top are mapped to XAxisLabel, while left and right are mapped to YAxisLabel.

@MarkBaker
Copy link
Member

Thank you for this resolution to problems with single-axis charts

@MarkBaker MarkBaker merged commit c82ff25 into PHPOffice:master Jan 31, 2021
BlackyTay pushed a commit to BlackyTay/PhpSpreadsheet that referenced this pull request Aug 8, 2025
* use axPos value to determine whether an axis title is mapped to the XaxisLabel or YaxisLabel

* update changelog

* Fix php-cs-fixer violations

Co-authored-by: Darren Maczka <dkm@utk.edu>
Co-authored-by: Mark Baker <mark@lange.demon.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants