PhpSpreadsheet/samples/Chart
oleibman 5c13b179a1
Replace Dev jpgraph/jpgraph with mitoteam/jpgraph (#2997)
* Replace Dev jpgraph/jpgraph with mitoteam/jpgraph

PR #2979 added support for mitoteam/jpgraph as an alternative to jpgraph/jpgraph. The package jpgraph/jpgraph is abandoned in composer, and the version loaded with composer has been unusable for some time. This PR removes the dev requirement for jpgraph/jpgraph, and adds a dev requirement for mitoteam/jpgraph in its place.

With a usable graph library, a number of tests and samples that had been disabled are now re-enabled. A lot of new functionality has been added to Charts recently. Some of that new code has exposed bugs in JpgraphRendererBase. I have fixed those where I could. A handful of exceptions remain; I will investigate, and hopefully fix, those over time, but I don't feel it is necessary to fix them all before installing this PR - we are already way ahead of the game with the graphs that are working.

Three members had been ignoring code coverage in whole or in part because of the unavailability of a usable graph libray. Code coverage is restored in them. I am relieved to report that, although they aren't completely covered, adding them did not reduce code coverage by much - it is still over 90.4%.

I took a look at JpgraphRendererBase and Phpstan. Phpstan reports 128 problems. When I added some docblocks to correct some of those, the number increased to 284. Sigh. I will investigate over time, but, for now, we will still suppress Phpstan for JpgraphRendererBase.

I do not find a License file for mitoteam. However, there also wasn't one for jpgraph in the first place. Based on that and the discussion in #2996 (mitoteam will be used in exactly the same manner as mpdf), I don't think this is a problem. IANAL.

* PHP 8.2 Problems

Tons of "cannot create dynamic property" deprecations in jpgraph. Disable the test with most of those for now; leave the two with only a handful of messages enabled.

* Correct Failures in 2 Stock Charts

Down to 6 templates on which Render fails.
2022-08-13 18:14:25 -07:00
..
32_Chart_read_write.php Upgrade to PHP-CS-Fixer 2.7 2017-10-01 20:07:04 +09:00
32_Chart_read_write_HTML.php Replace Dev jpgraph/jpgraph with mitoteam/jpgraph (#2997) 2022-08-13 18:14:25 -07:00
32_Chart_read_write_PDF.php Replace Dev jpgraph/jpgraph with mitoteam/jpgraph (#2997) 2022-08-13 18:14:25 -07:00
33_Chart_create_area.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_bar.php Merge all examples together 2017-10-01 17:48:59 +09:00
33_Chart_create_bar_custom_colors.php Additional Support for Chart DataSeriesValues (#2906) 2022-06-29 17:52:09 -07:00
33_Chart_create_bar_labels_lines.php Move Gridlines from Chart to Axis (#2923) 2022-07-07 21:48:12 -07:00
33_Chart_create_bar_stacked.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_bubble.php Charts Additional Support for Layout and DataSeriesValues (#2922) 2022-07-04 08:43:54 -07:00
33_Chart_create_column.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_column_2.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_composite.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_line.php Additional Support for Chart DataSeriesValues (#2906) 2022-06-29 17:52:09 -07:00
33_Chart_create_multiple_charts.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_pie.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_pie_custom_colors.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_radar.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_scatter.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
33_Chart_create_scatter2.php Add Chart Axis Option textRotation (#2940) 2022-07-17 06:46:22 -07:00
33_Chart_create_scatter3.php Charts - Gradients, Transparency, Hidden Axes (#2950) 2022-07-23 08:06:13 -07:00
33_Chart_create_scatter4.php Charts - Gradients, Transparency, Hidden Axes (#2950) 2022-07-23 08:06:13 -07:00
33_Chart_create_scatter5_trendlines.php Charts Support for Rounded Corners and Trendlines (#2976) 2022-08-06 18:06:36 -07:00
33_Chart_create_stock.php Scrutinizer Complains Some Samples Class Name Conflict with Jpgraph (#2684) 2022-03-16 15:59:53 -07:00
34_Chart_update.php Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
35_Chart_render.php Replace Dev jpgraph/jpgraph with mitoteam/jpgraph (#2997) 2022-08-13 18:14:25 -07:00