PhpSpreadsheet/samples
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
..
Autofilter Autofilter Part 2 2021-06-24 10:09:21 +02:00
Basic Copy from Xls(x) to Html/Pdf Loses Drawings (#2788) 2022-05-07 08:10:24 -07:00
Calculations Additional unit tests for HLOOKUP() and VLOOKUP() and Examples for VLOOKUP() 2021-05-29 13:35:42 +02:00
Chart Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
ConditionalFormatting Handle the case of an invalid formula by defaulting to ptgInt + 0, which will avoid breaking the file 2022-03-13 10:53:07 +01:00
DefinedNames Make DefinedNames Samples Consistent With Other Samples (#1707) 2020-11-11 11:02:04 +01:00
Pdf Mpdf With Very Many Styles (#2434) 2021-12-07 10:46:21 -08:00
Reader Resolve Scrutinizer Reports for Samples (#2691) 2022-03-21 13:17:25 -07:00
Reading_workbook_data Document Properties - Coverage and 32-bit-safe Timestamps (#2113) 2021-05-30 13:55:58 +02:00
Table Table name as an constructor argument 2022-04-17 17:48:38 +05:30
bootstrap Update Jquery to V3.6 2021-11-24 09:12:46 +09:00
images Special Characters in Image File Name (#2416) 2021-12-06 06:50:09 -08:00
templates Some Fixes for Scatter Charts (#2828) 2022-05-17 07:48:24 -07:00
Bootstrap.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
Header.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
favicon.ico Update Jquery to V3.6 2021-11-24 09:12:46 +09:00
index.php Drop PHP 7.2 2021-11-01 12:01:54 +09:00