Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xchwarze/yii2-chart-widget
Chart implementation of chartist for yii2 framework
https://github.com/xchwarze/yii2-chart-widget
chart charts yii2 yii2-extension
Last synced: 3 days ago
JSON representation
Chart implementation of chartist for yii2 framework
- Host: GitHub
- URL: https://github.com/xchwarze/yii2-chart-widget
- Owner: xchwarze
- License: mit
- Created: 2018-08-21T22:33:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-21T22:48:29.000Z (about 6 years ago)
- Last Synced: 2024-09-07T05:27:24.733Z (27 days ago)
- Topics: chart, charts, yii2, yii2-extension
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yii2-widget-chart
Wrapper for [CHARTIST.JS](http://gionkunz.github.io/chartist-js/index.html) library## Resources
* [yii2](https://github.com/yiisoft/yii2) framework
* [gionkunz/chartist-js](https://github.com/gionkunz/chartist-js)## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/)
Either run
```sh
$ php composer.phar require --prefer-dist "exocet/yii2-chart-widget"
```
or add```json
{
"require": {
"exocet/yii2-chart-widget": "~1.0"
}
}
```to the `require` section of your `composer.json`
## Example Usage
```php
title = 'my example';
$this->params['breadcrumbs'][] = $this->title;?>
Chart::TYPE_LINE,
'disableCss' => true, //disable chartist css
'label' => true, //enable labels plugin
'labels' => [1, 2, 3, 4],
'series' => [[100, 120, 180, 200]],
'clientOptions' => [
'showLine' => false,
'axisX' => [
'labelInterpolationFnc' => new JsExpression('function(value, index) {
return index % 13 === 0 ? \'W\' + value : null;
}')
]
],
'responsiveOptions' => [
'screen and (min-width: 640px)' => [
'axisX' => [
'labelInterpolationFnc' => new JsExpression('function(value, index) {
return index % 4 === 0 ? \'W\' + value : null;
}')
]
]
]
]);
?>
```## Ajax Example Usage
```php
title = 'my example';
$this->params['breadcrumbs'][] = $this->title;?>
Chart::TYPE_LINE,
'ajax' => Url::to(['ajax-data']),
]);
?>
```## License
**yii2-chart-widget** is released under MIT license. See bundled [LICENSE](LICENSE) for details