2017 © Pedro Peláez
 

yii2-extension yii2-highcharts

Highcharts extension for the Yii framework

image

khotim/yii2-highcharts

Highcharts extension for the Yii framework

  • Wednesday, January 10, 2018
  • by khotim
  • Repository
  • 1 Watchers
  • 2 Stars
  • 4 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-highcharts

Yii2 wrapper for Highcharts library. It supports rendering Highcharts, Highstock, and Highmaps., (*1)

Latest Stable Version License, (*2)

Installation

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

Either run, (*4)

php composer.phar require --prefer-dist khotim/yii2-highcharts "*"

or add, (*5)

"khotim/yii2-highcharts": "*"

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

Usage

Insert the following code into a view file (using this sample)., (*7)

<?= \khotim\highcharts\Highcharts::widget([
    'chartType' => \khotim\highcharts\Highcharts::TYPE_HIGHCHARTS,
    'options' => [
        'id' => 'myChart'
    ],
   'clientOptions' => [
        'chart' => [
            'type' => 'bar'
        ],
        'title' => [
            'text' => 'Fruit Consumption'
        ],
        'xAxis' => [
            'categories' => ['Apples', 'Bananas', 'Oranges']
        ],
        'yAxis' => [
            'title' => [
                'text' => 'Fruit eaten'
            ]
        ],
        'series' => [
            [
                'name' => 'Jane',
                'data' => [1, 0, 4]
            ],
            [
                'name' =>'Production',
                'data' => [5, 7, 3]
            ]
        ]
    ]
]) ?>

Constants

Constant   Value   Description
TYPE_HIGHCHARTS   1   Chart type Highcharts.
TYPE_HIGHSTOCK   2   Chart type Highstock.
TYPE_HIGHMAPS   3   Chart type Highmaps.

Public Properties

Property   Type   Description
$chartType   integer   Specifies type of chart to be rendered. Defaults to self::TYPE_HIGHCHARTS.
$options   array   The HTML attributes for the widget container tag. The "tag" element specifies the tag name of the container element and defaults to "div".
$clientOptions   array   The options for the underlying Highcharts library. Refers to this page for more information.

The Versions

10/01 2018

dev-master

9999999-dev

Highcharts extension for the Yii framework

  Sources   Download

MIT

The Requires

 

by Thimy Khotim

library yii2 highcharts highstock highmaps

08/01 2016

v1.0.0

1.0.0.0

Highcharts extension for the Yii framework

  Sources   Download

MIT

The Requires

 

by Thimy Khotim

library yii2 highcharts highstock highmaps