PhpSpreadsheet/tests/PhpSpreadsheetTests/Writer/Xlsx
oleibman 9aa1708468
Some Fixes for Scatter Charts (#2828)
* Some Fixes for Scatter Charts

Chart issues have been pouring in recently. This is a partial response to issue #2762. It implements "no joins" for scatter charts, as well as having the reader and writer handle "point size", "line width", and "color" for markers. A new boolean property `scatterLines`, with setter and getter, is added to DataSeriesValues to handle joins (default is true which means scatter plot points *are* joined by lines). Some, but not yet all, default font properties for the chart title are handled (color and, surprisingly, font name present challenges).

With these changes, sample 32readwriteScatterChart1.xlsx now looks closer to its source. There are still some differences (x-axis changes), but I think this change is already large enough. I can work on the other problems later.

The code for reading charts has not yet been converted to be namespace aware. Having a tiny island of aware code in a sea of unaware makes no sense to me, so some of the new code is likewise unaware. I hope to be able to get to it eventually, but, among other considerations, it is difficult to generate suitable test cases.

* Add Formal Tests

Essentially the same as the corresponding Samples, but with formal assertions.

* Clean Up Some Code in Reader/Xlsx/Chart

Having added code to support default font attributes as well as element-specific font attributes for chart captions, there was duplicated code between the default and specific sections. I hope that this PR makes the code easier to follow.

* Add Support for Font Name and Color to XLSX Chart Titles

XML layout for these in new files differs from what program was expecting. Not sure if program expectations were wrong, or if this is a change to Excel since initial development.

* Minor Improvement

Handle theoretical case where Chart title has text but no font information.

* Support Bezier Curve and Scaling of X-Axis on Scatter Plot

For Bezier, need to specify `<c:smooth>` tag in addition to already supplied `<c:scatterStyle val="smoothMarker">`

For X-Axis, scatter needs to supply both X and y axis as `<c:valAx>` rather than `<c:catAx>` for X.
2022-05-17 07:48:24 -07:00
..
Charts32ScatterTest.php Some Fixes for Scatter Charts (#2828) 2022-05-17 07:48:24 -07:00
Charts32XmlTest.php Some Fixes for Scatter Charts (#2828) 2022-05-17 07:48:24 -07:00
ConditionalTest.php Read conditional styling for cell (#2491) 2022-01-22 19:18:26 +01:00
DrawingsTest.php Assertion updates 2022-05-11 16:06:44 +02:00
FloatsRetainedTest.php Now That SettingsTest Is Well-Behaved 2021-06-30 13:15:20 -07:00
Issue589Test.php Don't corrupt file when using chart with fill color 2021-11-23 23:34:48 +09:00
Issue2082Test.php Xlsx Writer Formula with Bool Result of False 2021-05-11 13:48:38 +02:00
Issue2266Test.php Deleting Sheet with Local Defined Name (#2284) 2021-09-15 12:14:13 -07:00
Issue2368Test.php Support Data Validations in More Versions of Excel (#2377) 2021-11-14 10:06:46 -08:00
LocaleFloatsTest.php New Looming Problems with PHP8.1 (#2231) 2021-08-03 21:37:53 -07:00
StartsWithHashTest.php Now That SettingsTest Is Well-Behaved 2021-06-30 13:15:20 -07:00
Unparsed2396Test.php Name Clashes Between Parsed and Unparsed Drawings (#2423) 2021-12-09 23:37:15 -08:00
UnparsedDataCloneTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
UnparsedDataTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
VisibilityTest.php Unit testing for row/column/worksheet visibility for Xls and Xlsx files (#2059) 2021-05-03 23:46:40 +02:00
WmfTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00