Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yii2mod/yii2-c3-chart
Yii2 wrapper for D3-based reusable chart library
https://github.com/yii2mod/yii2-c3-chart
yii2 yii2-c3 yii2-chart yii2-chart-widget yii2-extension
Last synced: about 5 hours ago
JSON representation
Yii2 wrapper for D3-based reusable chart library
- Host: GitHub
- URL: https://github.com/yii2mod/yii2-c3-chart
- Owner: yii2mod
- License: mit
- Created: 2015-06-17T08:58:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-26T10:33:25.000Z (about 7 years ago)
- Last Synced: 2024-09-19T08:15:29.505Z (8 days ago)
- Topics: yii2, yii2-c3, yii2-chart, yii2-chart-widget, yii2-extension
- Language: PHP
- Size: 63.5 KB
- Stars: 11
- Watchers: 9
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Yii2 Chart Widget
Yii2 wrapper for D3-based reusable chart library
[![Latest Stable Version](https://poser.pugx.org/yii2mod/yii2-c3-chart/v/stable)](https://packagist.org/packages/yii2mod/yii2-c3-chart) [![Total Downloads](https://poser.pugx.org/yii2mod/yii2-c3-chart/downloads)](https://packagist.org/packages/yii2mod/yii2-c3-chart) [![License](https://poser.pugx.org/yii2mod/yii2-c3-chart/license)](https://packagist.org/packages/yii2mod/yii2-c3-chart)
[![Build Status](https://travis-ci.org/yii2mod/yii2-c3-chart.svg?branch=master)](https://travis-ci.org/yii2mod/yii2-c3-chart)Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist yii2mod/yii2-c3-chart "*"
```or add
```
"yii2mod/yii2-c3-chart": "*"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply use it in your code by :
```php
[
'id' => 'popularity_chart'
],
'clientOptions' => [
'data' => [
'x' => 'x',
'columns' => [
['x', 'week 1', 'week 2', 'week 3', 'week 4'],
['Popularity', 10, 20, 30, 50]
],
'colors' => [
'Popularity' => '#4EB269',
],
],
'axis' => [
'x' => [
'label' => 'Month',
'type' => 'category'
],
'y' => [
'label' => [
'text' => 'Popularity',
'position' => 'outer-top'
],
'min' => 0,
'max' => 100,
'padding' => ['top' => 10, 'bottom' => 0]
]
]
]
]); ?>
```Chart Examples
----------------
You can find them on the [examples page](http://c3js.org/examples.html)Chart Options
----------------
You can find them on the [options page](http://c3js.org/reference.html)