Giter Site home page Giter Site logo

wtom / jpgraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mitoteam/jpgraph

0.0 0.0 0.0 3.76 MB

JpGraph library composer package with PHP 8.2 support

Home Page: https://packagist.org/packages/mitoteam/jpgraph

License: Other

PHP 100.00%

jpgraph's Introduction

JpGraph library composer package with PHP 8.2 support

Packagist Version Packagist PHP Version Support Packagist Total Downloads Packagist Monthly Downloads

GitHub Version GitHub Release Date GitHub code size in bytes GitHub contributors GitHub commit activity

Current JpGraph library version: 4.4.2

PHP versions support: from 5.5 to 8.2. Original notes about PHP versions.

Usage with composer

This package is a helper to load original JpGraph library after declaring it as your dependency in composer.json:

composer require mitoteam/jpgraph

Then you can load library from anywhere in your code:

use mitoteam\jpgraph\MtJpGraph;

// load library and modules
MtJpGraph::load();                # not really useful without modules
//or
MtJpGraph::load('bar');           # load with single module
//or
MtJpGraph::load(['bar', 'line']); # load with several modules
//or
MtJpGraph::load(['bar', 'line'], true); # load with several modules in Extended Mode (see below)

//using original JpGraph classes
$graph = new Graph(200, 300);

You can call MtJpGraph::load() method as many times as you need everywhere in your code. Internally it checks if library or module was already loaded and does not load it another time.

Usage without composer

Download latest version archive from Releases page and unpack it.

Version numbers

We started with version 4.3.5 as latest available library version in time we started. But we need to make some patches to original library (for example to support latest PHP versions). So we had to switch to own version numbers to be able to release updates.

At 2022-02-25 we decided to switch to version number 10.0.0 to leave some margin in numbering from original library v4.3.5.

Current version numbers:

  • Version 10.3.x of this package is latest version of JpGraph library with php 8.2 compatibility patches (latest code in "main" branch). Can be loaded in Extended Mode (see below).
  • Version 4.4.x of this package provides latest version of original JpGraph library as-is without any compatibility patches (latest code in "original" branch).

All changes to the original library can be examined as difference between main and original branches.

Extended Mode

We started with just patches for compatibility with PHP 8.1 and 8.2. Before version 10.3 there were no any changes to original code except adding some typecasting or declaring some class members explicitly.

But after library was used wider there were some bugs discovered in original code. We aware to change functionality of the original library so Extended Mode was introduced in version 10.3.0. Now you can pass true as second argument to MtJpGraph::load() method to enable Extended Mode. This will enable several more patches to the original code to overcome some bugs.

Extended Mode is disabled by default, you can enable it explicitly only.

Links

jpgraph's People

Contributors

f1mishutka avatar pryx avatar wtom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.