mikepsinn/php-highcharts-exporter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mikepsinn/php-highcharts-exporter

最新稳定版本:1.0.4

Composer 安装命令:

composer require mikepsinn/php-highcharts-exporter

包简介

Export highcharts from PHP without running the NodeJS export server

README 文档

README

Generate Charts on Server Side using Highcharts without NodeJS

Latest Version on Packagist Build Status Quality Score Total Downloads

Install

Via Composer

$ composer require mikepsinn/php-highcharts-exporter

Add the following post-install-cmd to your composer.json file so that phantomjs is executable

  "scripts": {
    "post-install-cmd": [
      "chmod +x vendor/mikepsinn/php-highcharts-exporter/phantomjs"
    ]
  }

Usage

$export = new HighchartsExport(HighchartsExport::getConfigContents('test-basic-line'));
$export->setOutputFileName("test-chart.png"); // optional
$export->setImageType("png"); // optional
$path = $export->getFilePath(); // Absolute output file path on server
$data = $export->getImageData(); // Raw image data can be saved to file
$html = $export->getHtml(); // Inline this in any html file

Testing

$ composer test

Security

If you discover any security related issues, please email m@thinkbynumbers.org instead of using the issue tracker.

Credits

  • Mike P. Sinn
  • All Contributors
  • PhantomJS (phantomjs.org) is a headless WebKit scriptable with JavaScript.
  • Highcharts JS (highcharts.com) is a JavaScript charting library based on SVG, with fallbacks to VML and canvas for old browsers.

License

The MIT License (MIT). Please see License File for more information.

Development Notes

Test to Make Sure it Works With Known Good Options File

  • cd && ./phantomjs highcharts-convert.js -infile test-options.json -constr Chart -outfile images/test.png

Basic Command Line Test

  • ./phantomjs highcharts-convert.js -infile test-basic-line.json -constr Chart -outfile images/basic-line.png

Command Line Usage

  • Save your highchart config to images/options.json
  • cd && ./phantomjs highcharts-convert.js -infile images/options.json -constr Chart -outfile images/test.png

Tutorial

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-19