2017 © Pedro Peláez
 

yii2-extension flot

Yii2 flot widget

image

conquer/flot

Yii2 flot widget

  • Wednesday, December 9, 2015
  • by borodulin
  • Repository
  • 2 Watchers
  • 0 Stars
  • 259 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

Flot widget for Yii2 framework

Description

Flot is a pure JavaScript plotting library for jQuery, with a focus on simple usage, attractive looks and interactive features. Works with Internet Explorer 6+, Chrome, Firefox 2+, Safari 3+ and Opera 9.5+ For more information please visit Flot, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

To install, either run, (*3)

$ php composer.phar require conquer/flot "*"

or add, (*4)

"conquer/flot": "*"

to the require section of your composer.json file., (*5)

Usage

use conquer\flot\FlotWidget;

<= FlotWidget::widget([
    'htmlOptions'=>['class'=>'chart'],
    'data'=>[
        ['labels'=>'Unique Visits', 'data'=>array_map(function($v){return [$v, rand(10,50)];}, range(1, 30))],
        ['labels'=>'Page Views', 'data'=>array_map(function($v){return [$v, rand(10,50)];}, range(1, 30))],
    ],
    'options'=>[
        'series'=>[
            'lines'=> [
                'show'=> true,
                'lineWidth'=> 2,
                'fill'=> true,
                'fillColor'=> ['colors'=> [
                            ['opacity'=>0.05],
                            ['opacity'=>0.01],
                ]],
            ],
            'points'=>['show'=>true],
            'shadowSize'=> 2,
        ],
        'grid'=> [
            'hoverable'=> true,
            'clickable'=> true,
            'tickColor'=> "#eee",
            'borderWidth'=> 0,
        ],
        'colors'=> ["#d12610", "#37b7f3", "#52e136"],
        'xaxis' => [
            'ticks'=> 11,
            'tickDecimals'=> 0,
        ],
        'yaxis'=> [
            'ticks'=> 11,
            'tickDecimals'=> 0,
        ]       
    ],
]); =>

License

conquer/flot is released under the MIT License. See the bundled LICENSE.md for details., (*6)

The Versions

09/12 2015

dev-master

9999999-dev https://github.com/borodulin/yii2-flot

Yii2 flot widget

  Sources   Download

MIT

The Requires

 

extension yii2 widget flot