wayeet/c3js-php
Composer 安装命令:
composer require wayeet/c3js-php
包简介
A wrapper library for c3js to use it synchronously from php (all versions)
README 文档
README
PHP Wrapper für C3js based on D3. Was written some years ago and I have now decided import it to GH and make it public for anyone to use. Absolutely WIP but the most important charts are implemented.
Get started using c3js-php
- Install the package using composer
composer require wayeet/c3js-php:dev-main
When the package is finished in some time you can stop using :dev-main as the it will enter stable...
- Import the autoload-File (if this is the first composer package in your project) at the top of the php file
require_once __DIR__ . "/vendor/autoload.php";
- Import the css and js dependencies by calling the "Includer". The includeALL methods injects all the needed Code directly into the head tag
<head>
<?php>
$includer = new Util\Includer();
$includer->includeALL();
?>
</head>
- Start using the charts. For e.g. the BarChart Class
<?php $demoData = [ ['data1', 30, 200, 100, 400, 150, 250], ['data2', 130, 100, 140, 200, 150, 50] ]; $chart = new C3Charts\BarChart("test", $demoData, true); $chart->preRender(); $chart->render(); ?>
Docs
tdb
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-03