Yii Framework Forum: setup for highcharts extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

setup for highcharts extension

#1 User is offline   rvsingh 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 22-January 16

Posted 23 January 2016 - 09:36 AM

Hi All,
I am trying to use highcharts in my web application and downloaded the highchart zip file from herehere ,I put the below code in 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))
)
)
)); ,As per the installation instructions give on the extension site,But when i try to run the web application I am getting the below error


Alias "ext.highcharts.HighchartsWidget" is invalid. Make sure it points to an existing PHP file and the file is readable.


I have googled it ,but didn't find anything regarding the error,Can any one please let me know what went wrong and where else I need to put the entry of this extension.I have just starting learning yii.Any help would be plus

Thanks
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,317
  • Joined: 10-October 10
  • Location:Denmark

Posted 23 January 2016 - 09:38 AM

/* moved to the Extensions forum .. */
"Less noise - more signal"
0

#3 User is offline   rvsingh 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 22-January 16

Posted 23 January 2016 - 10:06 AM

Hi,
I just solved the issue.For those you are having the same problem the fix for this is:
1. Unzip the downloaded ext file into protected/extentions and rename it by removing the version number.
2. add an entry in config/main.php in import section like this:

'import'=>array(
'application.models.*',
'application.components.*',
'zii.widgets.jui.CJuiAccordion',
'ext.yii-highcharts.*',

),

3.Now in your view use the extension name like this
'ext.yii-highcharts.highcharts.HighchartsWidget'

That's it ::)
Thanks
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users