承接 shawnmccool/jpgraph 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shawnmccool/jpgraph

Composer 安装命令:

composer require shawnmccool/jpgraph

包简介

jpGraph, library to make graphs and charts

README 文档

README

You're seeing the README for version ^4, which requires PHP v7.0 or newer. If you need to run under PHP 5.6, please check release v3.6

Packagist FOSSA Status

Code Climate Codacy Badge Scrutinizer Code Quality Build Status StyleCI Code Coverage FOSSA Status

For a long time, JpGraph got stalled at version 3.5.x (see its README), so we decided to refactor and release a Community Edition with a few improvements:

  • 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
  • It requires PHP 7.0 or newer
  • it provides full composer compatibility
  • it has PSR-4 autoloading
  • it makes requirement checks so you can't go wrong
  • it has release tags, to let composer install use your cached packages instead of pulling from github every time
  • I stripped the docs because they are useless weight in a dependency. You can find them here
  • The Examples folder were moved upwards, althought they are now in categories. Not all of them work at this point
  • Examples pointing to features not present in the free tool were stripped from said folder (e.g. Barcodes)
  • If the chosen font isn't found, it falls back to existing fonts instead of crashing
  • If you try to use antialiasing functions not present in your current GD installation, it disables them instead of crashing

How to install

Using composer

composer require amenadiel/jpgraph:^4

How to use

See the examples folder for working samples.

The examples work the same way you should use this library:

  • run composer install

  • require vendor/autoload.php it the top of your script

  • generate a graph with a snippet like the following

   require_once './vendor/autoload.php';
   use Amenadiel\JpGraph\Graph;
   use Amenadiel\JpGraph\Plot;

   // Create the Pie Graph.
   $graph = new Graph\PieGraph(350, 250);
   $graph->title->Set("A Simple Pie Plot");
   $graph->SetBox(true);

   $data = array(40, 21, 17, 14, 23);
   $p1   = new Plot\PiePlot($data);
   $p1->ShowBorder();
   $p1->SetColor('black');
   $p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3'));

   $graph->Add($p1);
   $graph->Stroke();
  • important always instance your graph (of any kind) before creating its contents. This will in turn load all needed constants to the global scope.

See the examples working by performing the following steps:

  • run composer install
  • run make start or php -S localhost:8000 -t Examples
  • Open your browser at http://localhost:8000

Change the config

You can override some configs set on config.inc.php by creating a .env file in your project root. See .env.example as a reference.

Wishlist

  • Get all the examples working (half of them have yet to be transformed from the old code to the new PSR-4 format)
  • Add more tests (We need to test more classes and methods besides the ones in the examples, as well as perform more assetions on the current tests)
  • Add alternative use of imagick

jpgraph_logo

License

FOSSA Status

shawnmccool/jpgraph 适用场景与选型建议

shawnmccool/jpgraph 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 02 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「data」 「graph」 「chart」 「pie」 「jpgraph」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 shawnmccool/jpgraph 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 shawnmccool/jpgraph 我们能提供哪些服务?
定制开发 / 二次开发

基于 shawnmccool/jpgraph 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 58
  • 开发语言: PHP

其他信息

  • 授权协议: QPL-1.0
  • 更新时间: 2020-02-01