定制 loveorigami/php-highcharts 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

loveorigami/php-highcharts

Composer 安装命令:

composer require loveorigami/php-highcharts

包简介

A php wrapper for highcharts and highstock javascript libraries

README 文档

README

Php-Highcharts is a port HighchartsPHP for php >= 7.1 with auto-compleate in IDE.

Php-Highcharts is a PHP library that works as a wrapper for the Highchart js library (http://www.highcharts.com) and it was built with flexibility and maintainability in mind. It isn't a simple port of the JavaScript library to PHP, it was designed in a way that mimics the JavaScript counterpart API, so that the developer only needs to learn one API.

The companion webpage can be found at http://www.goncaloqueiros.net/highcharts.php

Setup

The recommended way to install HighchartsPHP is through Composer. Just create a composer.json file and run the php composer.phar install command to install it:

{
    "require": {
        "loveorigami/php-highcharts": "@dev"
    }
}

Usage

Simple

You can create a highchart using the Highchart constructor.

//This will create a highchart chart
$chart = new Highchart();

Now that there's a valid $chart object the developer only needs to add elements to it as if it was writing them in JavaScript.

$chart->title = ['text' => 'Monthly Average Temperature', 'x' => -20];
or
$chart->title->text = 'Monthly Average Temperature';
$chart->title->x = -20;

You can also create simple arrays

$chart->series[] = ['name' => 'Tokyo', 'data' => [7.0, 6.9, 9.5]];
or
$chart->series[0] = ['name' => 'Tokyo', 'data' => [7.0, 6.9, 9.5]];
or
$chart->series[0]->name = 'Tokyo';
$chart->series[0]->data = [7.0, 6.9, 9.5];

and after that get all options for using in Highchart as:

$chart->getOptions();
or
$chart->getJson();

Demos

All the Highcharts and Highstocks live demos present on http://www.highcharts.com under the demo gallery were reproduced using this library and you can find them on the demos folder or see a live example on http://www.goncaloqueiros.net/highcharts/demos.php

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固