Skip to content

Upgrade mitoteam/jpgraph #3603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ or the appropriate PDF Writer wrapper for the library that you have chosen to in
For Chart export, we support following packages, which you will also need to install yourself using `composer require`
- [jpgraph/jpgraph](https://packagist.org/packages/jpgraph/jpgraph) (this package was abandoned at version 4.0.
You can manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/))
- [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) - fork with modern PHP versions support.
- [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) - up to date fork with modern PHP versions support and some bugs fixed.

and then configure PhpSpreadsheet using:
```php
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
"dompdf/dompdf": "^1.0 || ^2.0",
"friendsofphp/php-cs-fixer": "^3.2",
"mitoteam/jpgraph": "^10.2.4",
"mitoteam/jpgraph": "^10.3",
"mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions samples/Chart/35_Chart_render33.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
$unresolvedErrors = [];
} else {
$unresolvedErrors = [
// The following spreadsheet was created by 3rd party software,
// and doesn't include the data that usually accompanies a chart.
// That is good enough for Excel, but not for JpGraph.
'33_Chart_create_bar_stacked.xlsx',
//'33_Chart_create_bar_stacked.xlsx', // fixed with mitoteam/jpgraph 10.3
];
}
foreach ($inputFileNames as $inputFileName) {
Expand Down
6 changes: 3 additions & 3 deletions src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace PhpOffice\PhpSpreadsheet\Chart\Renderer;

/**
* Jpgraph is not oficially maintained in Composer.
* Jpgraph is not officially maintained by Composer at packagist.org.
*
* This renderer implementation uses package
* https://packagist.org/packages/mitoteam/jpgraph
*
* This package is up to date for August 2022 and has PHP 8.1 support.
* This package is up to date for June 2023 and has PHP 8.2 support.
*/
class MtJpGraphRenderer extends JpGraphRendererBase
{
Expand All @@ -29,7 +29,7 @@ protected static function init(): void
'regstat',
'scatter',
'stock',
]);
], true); // enable Extended mode

$loaded = true;
}
Expand Down