2017 © Pedro Peláez
 

library yii-highcharts

Highcharts adapter for the Yii Framework

image

miloschuman/yii-highcharts

Highcharts adapter for the Yii Framework

  • Wednesday, November 16, 2016
  • by miloschuman
  • Repository
  • 8 Watchers
  • 31 Stars
  • 36,853 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 13 Forks
  • 2 Open issues
  • 16 Versions
  • 3 % Grown

The README.md

Yii Highcharts Widget

Latest Stable Version Total Downloads License Scrutinizer Code Quality, (*1)

Easily add Highcharts, Highstock and Highmaps graphs to your Yii application., (*2)

Screen Shot, (*3)

About

Highcharts

Create interactive charts easily for your web projects. Used by tens of thousands of developers and 59 out of the world's 100 largest companies, Highcharts is the simplest yet most flexible charting API on the market., (*4)

Highstock

Highstock lets you create stock or general timeline charts in pure JavaScript. Including sophisticated navigation options like a small navigator series, preset date ranges, date picker, scrolling and panning., (*5)

Highmaps

Build interactive maps to display sales, election results or any other information linked to geography. Perfect for standalone use or in dashboards in combination with Highcharts!, (*6)

Note: Highcharts is free for non-commercial use only. For more information, please visit the Highcharts License and Pricing page., (*7)

Requirements

  • Yii 1.1.5 or above
  • PHP 5.1 or above

Installation

  • Extract the release file under protected/extensions/

Usage

To use this widget, you may insert the following code into a view file:, (*8)

$this->Widget('ext.highcharts.HighchartsWidget', array(
   'options'=>array(
      'title' => array('text' => 'Fruit Consumption'),
      'xAxis' => array(
         'categories' => array('Apples', 'Bananas', 'Oranges')
      ),
      'yAxis' => array(
         'title' => array('text' => 'Fruit eaten')
      ),
      'series' => array(
         array('name' => 'Jane', 'data' => array(1, 0, 4)),
         array('name' => 'John', 'data' => array(5, 7, 3))
      )
   )
));

By configuring the options property, you may specify the options that need to be passed to the Highcharts JavaScript object. Please refer to the demo gallery and documentation on the Highcharts website for possible options., (*9)

Alternatively, you can use a valid JSON string in place of an associative array to specify options:, (*10)

$this->Widget('ext.highcharts.HighchartsWidget', array(
   'options'=>'{
      "title": { "text": "Fruit Consumption" },
      "xAxis": {
         "categories": ["Apples", "Bananas", "Oranges"]
      },
      "yAxis": {
         "title": { "text": "Fruit eaten" }
      },
      "series": [
         { "name": "Jane", "data": [1, 0, 4] },
         { "name": "John", "data": [5, 7,3] }
      ]
   }'
));

Note: You must provide a valid JSON string (double quotes) when using the second option. You can quickly validate your JSON string online using JSONLint., (*11)

See /doc/examples for more usage examples., (*12)

Tips

  • If you need to use JavaScript in any of your configuration options, use the js: prefix. For instance:, (*13)

    ...
    'tooltip' => array(
       'formatter' => 'js:function(){ return this.series.name; }'
    ),
    ...
    
  • Highcharts by default displays a small credits label in the lower right corner of the chart. This can be removed using the following top-level option., (*14)

    ...
    'credits' => array('enabled' => false),
    ...
    
  • Since version 3.0.2, all adapters, modules, themes, and supplementary chart types must be enabled through the top-level 'scripts' option., (*15)

    ...
    'scripts' => array(
       'highcharts-more',   // enables supplementary chart types (gauge, arearange, columnrange, etc.)
       'modules/exporting', // adds Exporting button/menu to chart
       'themes/grid'        // applies global 'grid' theme to all charts
    ),
    ...
    

    Previous versions relied on auto-detection magic, but that became less reliable as Highcharts evolved. The new method more accurately follows the native process of including/excluding additional script files and gives the user some finer-grain control. For a list of available scripts, see the contents of protected/extensions/highcharts/assets/., (*16)

  • You can access the JavaScript chart object from another script like this:, (*17)

    var chart = $('#my-chart-id').highcharts();
    

    where my-chart-id is set via the top-level id configuration option. Just make sure you register your script after the widget declaration so that it has a chance to initialize., (*18)

The Versions

16/11 2016

dev-master

9999999-dev

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

16/11 2016

v5.0.2

5.0.2.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

03/10 2016

v5.0.0

5.0.0.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

07/08 2016

v4.2.6

4.2.6.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

27/05 2016

v4.2.5

4.2.5.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

11/02 2016

v4.2.3

4.2.3.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

04/02 2016

v4.2.2

4.2.2.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

13/01 2016

v4.2.1

4.2.1.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

14/12 2015

v4.1.10

4.1.10.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

12/10 2015

v4.1.9

4.1.9.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

24/09 2015

v4.1.8

4.1.8.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

09/07 2015

v4.1.7

4.1.7.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

19/09 2014

v4.0.4

4.0.4.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

25/04 2014

v4.0.1

4.0.1.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

17/03 2014

v3.0.10

3.0.10.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock

17/02 2014

v3.0.9

3.0.9.0

Highcharts adapter for the Yii Framework

  Sources   Download

MIT

by Milo Schuman

yii highcharts highstock