d4rkstar / yii2-graphitejs
Yii 2 Graphitejs widget
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
This package is auto-updated.
Last update: 2024-10-12 10:46:33 UTC
README
This widget is a wrapper around GraphiteJS Jquery plugin.
GraphiteJS Plugin allow to easily make graphs and update them on the fly using Graphite's Render Url API.
Installation
The preferred way to install this extension is through composer.
Install
Either run
$ php composer.phar require d4rkstar/yii2-graphitejs "dev-master"
or add
"d4rkstar/yii2-graphitejs": "dev-master"
to the require
section of your composer.json
file.
Sample Usage
<?php
use d4rkstar\graphitejs\Graphitejs;
?>
...
<?= Graphitejs::widget([
'options' => [
'id'=>'serverLoadGraph',
],
'pluginOptions'=>[
'url'=>'http://localhost/render/',
'from'=>'-24hours',
// replace with your targets
'target'=>[
'server.load.load1',
'server.load.load5',
'server.load.load15'
],
'width'=>300,
'height'=>300,
]
]);
?>
For more usage, look at GraphiteJS examples and Graphite's Render Url API.