Skip to content

Commit b65ff9f

Browse files
authored
MtJpGraph support added (#2979)
#2979 Co-authored-by: Mikhail Oleynik <mishutka@mito-team.com>
1 parent 8bde1ac commit b65ff9f

File tree

7 files changed

+924
-860
lines changed

7 files changed

+924
-860
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org).
1111

1212
- Implementation of the new `TEXTBEFORE()`, `TEXTAFTER()` and `TEXTSPLIT()` Excel Functions
1313
- Implementation of the `ARRAYTOTEXT()` Excel Function
14+
- Support for [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) implementation of
15+
JpGraph library to render charts added.
1416

1517
### Changed
1618

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,18 @@ or the appropriate PDF Writer wrapper for the library that you have chosen to in
7171

7272
#### Chart Export
7373

74-
For Chart export, we support, which you will also need to install yourself
75-
- jpgraph/jpgraph
74+
For Chart export, we support following packages, which you will also need to install yourself using `composer require`
75+
- [jpgraph/jpgraph](https://packagist.org/packages/jpgraph/jpgraph) (this package was abandoned at version 4.0.
76+
You can manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/))
77+
- [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) (fork with php 8.1 support)
7678

7779
and then configure PhpSpreadsheet using:
7880
```php
79-
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
81+
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class); // to use jpgraph/jpgraph
82+
//or
83+
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class); // to use mitoteam/jpgraph
8084
```
8185

82-
You can `composer/require` the github version of jpgraph, but this was abandoned at version 4.0; or manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/)
83-
8486
## Documentation
8587

8688
Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).

phpstan.neon.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ parameters:
1111
- tests/
1212
excludePaths:
1313
- src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
14+
- src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php
15+
- src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php
1416
parallel:
1517
processTimeout: 300.0
1618
checkMissingIterableValueType: false

0 commit comments

Comments
 (0)