Commit Graph

10 Commits

Author SHA1 Message Date
oleibman 623caa89bc Changes for Chart Rendering Samples (#3551)
* Changes for Chart Rendering Samples

PR #3521 added chart rendering to the 33* samples. Some of those samples had rendering problems; this PR fixes some of the errors by changing some of the code in JpGraphRendererBase. I am discussing approaches to some other problems with mitoteam.

The changes in 3521 applied only when running the samples as web pages. A new member 35_Chart_render33 is added to do the same when running the samples from the command line. Because of 3521, 35_Chart_render and new 35_Chart_render33 (in web page mode) display rendering which is already displayed by other samples and so are superfluous as web pages, so they are no longer presented as options.

The samples in 35_Chart_render properly accounted for multiple charts on a single worksheet, but did not properly account for charts on multiple worksheets. This problem is fixed.

33_Chart_create_stock2 was added using a base from before 3521, but did not incorporate the 3521 changes. It now does so.

32_Chart_read_write_HTML and 32_Chart_read_write_PDF are made consistent with the 32* Xlsx samples by allowing the download of the generated file when run as web pages. Helper/Downloader needed a minor change to support Html. Some of the changes in PR #3522 require the Downloader change to work properly. Some samples which were not changed by 3522 are changed in this PR to give a more uniform look and feel to the web samples.

* Scrutinizer

Fix class name conflict. Ignore "complexity" problem.

* Improve Sample 26

The UTF8 sample 26 includes CJK characters. These are generated in Xls, Xlsx, Html, and Csv (with BOM) correctly. Csv without BOM has a problem, but that's Microsoft's problem, not ours. That leaves PDF, which currently does not display the CJK characters (nor a Latin extension character). Mpdf, in combination with editHtmlCallback (and earlier commits in this PR), can support them; change the sample to do so. Dompdf, which had been used for the sample, apparently supported Web Fonts at one time, which might also have solved this problem, but no longer seems to do so.

* Fix Style Problem

Need blank line.

* Change Some Spacing in Source Code

Make Header PSR12-compliant.
2023-05-09 21:41:39 -07:00
MarkBaker 495a011d26 Fix header for examples to make navigation easier 2023-04-04 01:47:38 +02:00
Adrien Crivelli 5f413b8a58 Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
Adrien Crivelli 1259549466 Drop unused code and fix some PhpStorm warnings 2017-10-08 01:21:32 +09:00
Adrien Crivelli 4fd8e742e7 Upgrade to PHP-CS-Fixer 2.7 2017-10-01 20:07:04 +09:00
Adrien Crivelli 50a0ec58af Merge all examples together
Closes #17
2017-10-01 17:48:59 +09:00
Adrien Crivelli ce1e83428b Keep documentation in a single place and link to it
Fixes #191
Closes #192
2017-07-30 16:23:41 +02:00
Zharikov Viktor 07455d24f6 Make global usage of use instead of FQCN
Closes #78
Closes #147
2017-05-18 00:10:16 +02:00
Adrien Crivelli 47cde0dadc Introduce vendor prefix PhpOffice to namespace 2016-09-01 02:20:47 +09:00
Adrien Crivelli 2922a13764 Reorganize code samples
This introduce a helper class that should be used to log things,
avoiding a lot of boilerplate code.

Also all output are made in /tmp folder instead of beside the script
itself. This is because there is a high chance that the folder containing
the script is not writtable by webserver. So using the /tmp folder
makes it more likely to works in a variety of setup.
2016-09-01 01:17:13 +09:00