2017 © Pedro Peláez
 

yii2-extension yii2-chartjs-widget

ChartJs widget for Yii2.

image

musingsz/yii2-chartjs-widget

ChartJs widget for Yii2.

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

ChartJs Widget

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

Renders a ChartJs plugin widget, (*2)

Installation

The preferred way to install this extension is through composer. This requires the composer-asset-plugin, which is also a dependency for yii2 – so if you have yii2 installed, you are most likely already set., (*3)

Either run, (*4)

composer require 2amigos/yii2-chartjs-widget:~2.0

or add, (*5)

"2amigos/yii2-chartjs-widget" : "~2.0"

to the require section of your application's composer.json file., (*6)

Usage

The following types are supported:, (*7)

  • Line
  • Bar
  • Radar
  • Polar
  • Pie
  • Doughnut

The following example is using the Line type of chart. Please, check ChartJs plugin documentation for the different types supported by the plugin., (*8)

use dosamigos\chartjs\ChartJs;

= ChartJs::widget([
    'type' => 'line',
    'options' => [
        'height' => 400,
        'width' => 400
    ],
    datasets =>
    [
        [
            'label' => "My First dataset",
            'backgroundColor' => "rgba(179,181,198,0.2)",
            'borderColor' => "rgba(179,181,198,1)",
            'pointBackgroundColor' => "rgba(179,181,198,1)",
            'pointBorderColor' => "#fff",
            'pointHoverBackgroundColor' => "#fff",
            'pointHoverBorderColor' => "rgba(179,181,198,1)",
            'data' => [65, 59, 90, 81, 56, 55, 40]
        ],
        [
            'label' => "My Second dataset",
            'backgroundColor' => "rgba(255,99,132,0.2)",
            'borderColor' => "rgba(255,99,132,1)",
            'pointBackgroundColor' => "rgba(255,99,132,1)",
            'pointBorderColor' => "#fff",
            'pointHoverBackgroundColor' => "#fff",
            'pointHoverBorderColor' => "rgba(255,99,132,1)",
            'data' => [28, 48, 40, 19, 96, 27, 100]
        ]
    ]
]);
?>

Further Information

ChartJs has lots of configuration options. For further information, please check the ChartJs plugin website., (*9)

Contributing

Please see CONTRIBUTING for details., (*10)

Credits

License

The BSD License (BSD). Please see License File for more information., (*11)

2amigOS!
Web development has never been so fun!
www.2amigos.us, (*12)

The Versions

16/03 2017

dev-master

9999999-dev http://yiiwheels.com/extension/chartjs-widget

ChartJs widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget chartjs

16/03 2017

0.4

0.4.0.0 http://yiiwheels.com/extension/chartjs-widget

ChartJs widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget chartjs

16/03 2017

0.3

0.3.0.0 http://yiiwheels.com/extension/chartjs-widget

ChartJs widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget chartjs

16/03 2017

0.2

0.2.0.0 http://yiiwheels.com/extension/chartjs-widget

ChartJs widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget chartjs

16/03 2017

0.1

0.1.0.0 http://yiiwheels.com/extension/chartjs-widget

ChartJs widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget chartjs