定制 chartron/app 二次开发

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

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

chartron/app

Composer 安装命令:

composer require chartron/app

包简介

Advanced charts for laravel

README 文档

README

License: MIT Chartron Usage Model

About Chartron

Chartron is a PHP library with elegant syntax. The easiest way to setup your dataset.

If you are using the Laravel framework i highly recommend the usage of chartron-routes

Example usage

This example code generates the dataset for the graph above.

//declare the library
use Chartron\APP\Chartron;

//build and configurations
$chartron = Chartron::build();
$chartron->monthLabels("EN");
    
//chart customization options
$options1 = ["backgroundColor"=>"#F20000"];
$options2 = ["backgroundColor"=>"#10A774"];
    
//set chartron datasets
$chartron->dataset("Team",[4,2,1,4,3,1,2,5,7,3,1,3],$options1);
$chartron->dataset('User',[1,2,7,6,4,5,1,5,7,1,2,5],$options2);
    
//return the json data object
return $chartron->keep();

Instalation

composer require chartron/app

First Steps

First initiate the cartron object

$chartron = Chartron::build();

Setup the chart label

$chartron->labels(["First","Second","Third"]);

Setup the dataset

$chartron->dataset("Users",[4,2,1]);

Then use the method keep to generate the JSON object;

$chartron->keep();

Options

Inside the option field you have the possibily to customtize with whenever you want based in the front end library chart you are using.

$options = ["backgroundColor"=>"#F20000"];

In this example i'm using Chart JS so i set the backgroundColor to #F20000 according to the Chart JS documentation

License

MIT License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-08-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固