This extension encapsulates the Highcharts graphing widget.

Highcharts is a charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application. Highcharts currently supports line, spline, area, areaspline, column, bar, pie and scatter chart types.
Compared to the other JavaScript charting libraries (Flot, jqPlot), Highcharts requires a more verbose configuration but also produces higher quality (animated) graphs, supports more advanced options without plugins, and uses only a single JavaScript file.
Please use the 'Reviews' tab only for reviews. If you have questions, requests, or bug reports use the links below.
Note: Highcharts is not free for commercial use. For more information, please visit the Highcharts License and Pricing page.
protected/extensionsTo use this widget, you may insert the following code in a view:
$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.
Alternatively, you can use a valid JSON string in place of an associative array to specify options:
$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 (e.g. double quotes) when using the second option. You can quickly validate your JSON string online using JSONLint.
js: prefix. For instance:... 'tooltip' => array( 'formatter' => 'js:function(){ return this.series.name; }' ), ...
... 'credits' => array('enabled' => false), ...
... 'exporting' => array('enabled' => false), ...
The Exporting module script file will not be registered if all highcharts widgets on a page have this option set to false.
.js".... 'theme' => 'dark-blue', ...
Four sample themes are provided in protected/extensions/highcharts/assets/themes/. Any custom theme files must be saved in this same directory.
Total 20 comments
Hi,
How can i remove the print option alone?
I got the option for removing the entire export icons listed on top right corner, but how can i remove only one and use the other?
Hello Guys, there seems to be a problem with stacked graphs and IE8. This code produces a blank graph in IE8, but shows the correct data in another context:
This line seems to be problematic:
When I remove this line, it works.
Any ideas?
hi, i m looking for a way to export a chart to excel?
Jonathan, flag series are currently only available via the highstock library. You would need to load that JavaScript file separately and proceed from there. See this forum post for more info.
Thanks a lot for this :)
Is it possible to use the flags series type with this widget ? If so, could you please post an example of how to use it on a series ?
Thanks, Jonathan
anyone fork repo? Then upgrade all ^_^
I tried to contact the author but he still have to reply... I'll upload a new extension if needed
I have created my application in Yii framework version 1.1.9 and use highcharts for display data in graphical format. Its working awsome but today i have upgrade my framework version to 1.1.13. Now i can not get chart in latest version of framework.
Please help me.
Thanks for share it! How can retrieve color array from highchart?
this js line-> var colors = Highcharts.getOptions().colors how can do it in widget ?
thanks
@manuel-84, I suggest that you PM the author directly and send your files.
I updated this extension to the latest highcharts 2.3.5 and improved the way scripts are loaded
If the author or someone else are interested PM me
Thank you very much!!! excelent job
Today it's on Version 2.3.3 (2012-10-04) I must refresh plugin folder or wait for this extension upgrade ?
thanks
Is there any way to add a refresh button in ajax to refresh the chart?
Has anyone had problems making the tooltips work?
EDIT: Using Yii 1.1.10, you need to replace the highcharts.js and the highcharts.src.js files with the latest ones from the highcharts website and tooltips will be fixed.
Hope this would help someone trying for more customized chart dispaly.
-Sirin k
Several people seem to struggle with using data directly from a CActiveDataProvider. One suggestion has been to typecast to int. I needed floats, which I assumed my numbers were (must have been strings?!?). Either way, typecast to integer or float and the array from the data provider should work.
2.2.1 has been released. Changelog here. Can you please include the newer version?
the best chart ever. thanks
Can it works with CActiveDataProvider, just like CGridView?How can I pass a dataprovider to Highcharts's series?Thanks!
Leave a comment
Please login to leave your comment.