• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..20-May-2021-

Examples/H03-May-2022-30,51117,698

src/H20-May-2021-41,41931,456

.codeclimate.ymlH A D13-Feb-2018465 2928

.gitignoreH A D13-Feb-201849 85

.scrutinizer.ymlH A D13-Feb-2018617 2925

LICENSE.mdH A D13-Feb-20184.3 KiB5226

MakefileH A D13-Feb-2018642 3625

README.mdH A D13-Feb-20185.6 KiB148103

composer.jsonH A D13-Feb-2018938 4037

composer.lockH A D13-Feb-2018593 2120

README.md

1## JPGRAPH 3.6.7, Community Edition
2
3[![Packagist](https://img.shields.io/packagist/dm/amenadiel/jpgraph.svg)](https://packagist.org/packages/amenadiel/jpgraph)
4[![Code Climate](https://codeclimate.com/github/HuasoFoundries/jpgraph/badges/gpa.svg)](https://codeclimate.com/github/HuasoFoundries/jpgraph)
5[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1a7ea0cac1d84bc79545c9f6ff85cd25)](https://www.codacy.com/app/amenadiel/jpgraph?utm_source=github.com&utm_medium=referral&utm_content=HuasoFoundries/jpgraph&utm_campaign=Badge_Grade) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HuasoFoundries/jpgraph/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/HuasoFoundries/jpgraph/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/HuasoFoundries/jpgraph/badges/build.png?b=master)](https://scrutinizer-ci.com/g/HuasoFoundries/jpgraph/build-status/master) [![StyleCI](https://styleci.io/repos/39590412/shield?branch=master)](https://styleci.io/repos/39590412)
6
7This is an unnoficial refactor of [JpGraph](http://jpgraph.net/) with thefollowing differences:
8- the app was fully refactored adding namespaces, proper folder hierarchy, separating each class in its own file and stripping the use of `require` and `include` to the bare minimum
9- dropping support for PHP < 5.4.
10- it provides full composer compatibility
11- it has PSR-4 autoloading
12- it makes requirement checks so you can't go wrong
13- it has release tags, to let `composer install` use your cached packages instead of pulling from github every time
14- I stripped the docs because they are useless weight in a dependency. [You can find them here](http://jpgraph.net/doc/)
15- The Examples folder were moved upwards, althought they are now in categories. Not all of them work at this point
16- Examples pointing to features not present in the free tool were stripped from said folder (e.g. Barcodes)
17- If the chosen font isn't found, it falls back to existing fonts instead of crashing
18- If you try to use antialiasing functions not present in your current GD installation, it disables them instead of crashing
19
20## How to install
21
22Using composer
23
24```sh
25composer require amenadiel/jpgraph:^3.6
26```
27
28## How to use
29
30See the [examples folder](https://github.com/amenadiel/jpgraph/tree/master/Examples) for working samples.
31
32The examples work the same way you should use this library:
33
34   - run `composer install`
35
36   - require `vendor/autoload.php` it the top of your script
37
38   - generate a graph with a snippet like the following
39
40   ```php
41   use Amenadiel\JpGraph\Graph;
42   use Amenadiel\JpGraph\Plot;
43
44   $data = array(40, 21, 17, 14, 23);
45   $p1 = new Plot\PiePlot($data);
46   $p1->ShowBorder();
47   $p1->SetColor('black');
48   $p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3'));
49
50   $graph = new Graph\PieGraph(350, 250);
51   $graph->title->Set("A Simple Pie Plot");
52   $graph->SetBox(true);
53
54   $graph->Add($p1);
55   $graph->Stroke();
56   ```
57
58See the examples working by performing the following steps:
59
60 - `composer install`
61 - `php -S localhost:8000`
62 - Open your browser at http://localhost:8000/Examples/index.html
63
64
65
66
67
68
69### Wishlist
70
71- Get all the examples working
72- If the project gains traction I can move the repo to an organization so there can be more mantainers and contributions
73- Add tests
74- Add CI tools
75- Add alternative use of [imagick](http://php.net/manual/en/imagick.setup.php)
76
77
78
79
80![jpgraph_logo](https://raw.githubusercontent.com/HuasoFoundries/jpgraph/master/jpgraph_logo.jpg)
81
82README FOR JPGRAPH 3.5.x
83=========================
84
85This package contains the JpGraph PHP library Pro version 3.5.x
86
87The library is Copyright (C) 2000-2010 Asial Corporatoin and
88released under dual license QPL 1.0 for open source and educational
89use and JpGraph Professional License for commercial use.
90
91Please see full license details at
92http://jpgraph.net/pro/
93http://jpgraph.net/download/
94
95* --------------------------------------------------------------------
96* PHP4 IS NOT SUPPORTED IN 2.x or 3.x SERIES
97* --------------------------------------------------------------------
98
99Requirements:
100-------------
101Miminum:
102* PHP 5.1.0 or higher
103* GD 2.0.28 or higher
104Note: Earlier versions might work but is unsupported.
105
106Recommended:
107* >= PHP 5.2.0
108* PHP Builtin GD library
109
110Installation
111------------
1121. Make sure that the PHP version is compatible with the stated
113   requirements and that the PHP installation has support for
114   the GD library. Please run phpinfo() to check if GD library
115   is supported in the installation.
116   If the GD library doesn't seem to be installed
117   please consult the PHP manual under section "Image" for
118   instructions on where to find this library. Please refer to
119   the manual section "Verifying your PHP installation"
120
1212. Unzip and copy the files to a directory of your choice where Your
122   httpd sever can access them.
123   For a global site installation you should copy the files to
124   somewhere in the PHP search path.
125
1263. Check that the default directory paths in jpg-config.inc.php
127   for cache directory and TTF directory suits your installation.
128   Note1: The default directories are different depending on if
129   the library is running on Windows or UNIX.
130   Note2: Apache/PHP must have write permission to your cache
131   directory if you enable the cache feature. By default the cache
132   is disabled.
133
134
135Documentation
136-------------
137The installation includes HTML documentation and reference guide for the
138library. The portal page for all documentation is
139<YOUR-INSTALLATION-DIRECTORY>/docs/index.html
140
141
142Bug reports and suggestions
143---------------------------
144Should be reported using the contact form at
145
146http://jpgraph.net/contact/
147
148