Yii Framework Forum: [Extension] HighchartsWidget - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] HighchartsWidget Wrapper widget for Highcharts Javascript library Rate Topic: -----

#41 User is offline   tihanyilaci 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 29-July 11

Posted 21 March 2012 - 03:06 PM

Hi Milo,

great extension!

My problem is: I would like to use the json key-value pair pointStart: Date.UTC(2009,9,6,0,0,0)
in a php array.
But it does not work.
I tried:
'pointStart'=>'Date.UTC(2009,9,6,0,0,0)'
'pointStart'=>'js:Date.UTC(2009,9,6,0,0,0)'
Any idea?

Thanks Laszlo from Hungary
0

#42 User is offline   w00tw00t111 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 05-January 12

Posted 29 March 2012 - 05:22 PM

Milo,

Awesome extension! Has made using Highcharts a breeze in Yii.

2 questions:

1. When setting tooltip formats such as:
'tooltip'=>array(
	'crosshairs'=>true,
	'shared'=>true,
	'valuePrefix'=>'$',
	'valueDecimals'=>2,
),

It seems default formatting is preserved. I've looked through the highcharts api docs and I believe this to be the correct format and datatypes that are getting passed into the tooltip/options variable. What am I missing?


2. When needing to attach a javascript function to the chart variable that is generated by the core highchartswidget - where/how do you pass this javascript function?
Take for instance this code:
http://jsfiddle.net/hfrntt/QMXe8/
and the function that is being attached to the chart variable for displaying a tooltip on hover of the legend.
0

#43 User is offline   BigZ 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 28-June 11

Posted 14 April 2012 - 01:04 PM

Hi all, this is a GREAT extension. Nice Job!

Q:
I'm trying to show the time on x axis (coming from DB) in local time.

According to HighCharts forum, HC displays the time in UTC by default and this the way to override it:
Highcharts.setOptions({
	global: {
		useUTC: false
 	}
});


But I don't seem to be able to make it work...

$this->Widget('ext.highcharts.HighchartsWidget', array(
	'options'=>array(
		'global' => array('useUTC' => 'false'),
...

Not working for me.

Any ideas?
0

#44 User is offline   SebK 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 19-April 12

Posted 08 May 2012 - 12:15 PM

It doesn't seem like anybody is providing answers here but I'll try anyways:

I've seen in the extension comments that the values from the dataprovider have to be integers. Is there no way to make it accept doubles or floats?

I manually created an array with doubles and it works. What doesn't work is directly loading the values from my db that I've stored as decimal(5,2). >:(
0

#45 User is offline   deez 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 04-January 12

Posted 17 May 2012 - 03:29 PM

@SebK type cast the to int or float like so:

		if(isset($statements))
		{
			foreach($statements as $key => $value)
			{
				$statement_totals[] = (float)$value;
			}
		}


Once you do this, the tooltip option should let you change the way your data is displayed to having x number of decimals
                    'tooltip'=>	array(
					'valueDecimals'=>2,
					'valuePrefix'=>'$',
				),



...but it doesn't. I can't seem to make the tooltip array work and that is what I came here needing assistance for. Anyone have any idea?


EDIT: Using yii 1.1.10 you need to update the highcharts.js and highcharts.src.js files from the highcharts website, then tooltips will work as I described here.
0

#46 User is offline   satyro 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 15-May 12

Posted 24 May 2012 - 05:10 AM

Hi, I use this extention in my web-app, and I use this http://www.yiiframew.../extension/pdf/ extension for generate pdf.

When I generate a pdf that include a chart, the chart don't appears in the pdf, but an SVG image are included into a pdf. well I want to know how is possible generate the SVG using widget code.


sorry for my english
thanks
0

#47 User is offline   babam 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 01-June 12

Posted 01 June 2012 - 02:49 AM

hi milo... thank you for build this good extension.. :D

i use this extension for my application, but i find a problem, how to change the default font size? such as for title, xAxis label etc.. how should i do?

thanks
0

#48 User is offline   dominus 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 14-June 12

Posted 17 September 2012 - 12:45 PM

Hi Milo, I'm having problems using the events for the chart, It throws me an error in jquery, I used like this:

$this->Widget('ext.highcharts.HighchartsWidget', array(
                'options' => array(
                    'chart'=>array('events'=>array('load'=>'function(event) {
                                                               alert ("Chart loaded");')),
                ));



can you please help me with this? is urgent
0

#49 User is offline   adil 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 25-January 12

Posted 29 September 2012 - 02:36 AM

how to display multiple axis using highchart extension
0

#50 User is offline   Sler 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 17-July 12

Posted 15 November 2012 - 09:16 AM

I would like to ask, I've downloaded Highstock and Highchart and extract it into the extensions/. renamed it to highcharts and highstock, but there is no HighstockWidget or HighchartWidget present in the folder. only these: examples, exporting-server, gfx, graphics, js, and index.html. Why is this?
0

#51 User is offline   José Yovany 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 19-October 12
  • Location:Oaxaca, México

Posted 28 November 2012 - 07:13 PM

View PostBigZ, on 14 April 2012 - 01:04 PM, said:

Hi all, this is a GREAT extension. Nice Job!

Q:
I'm trying to show the time on x axis (coming from DB) in local time.

According to HighCharts forum, HC displays the time in UTC by default and this the way to override it:
Highcharts.setOptions({
	global: {
		useUTC: false
 	}
});


But I don't seem to be able to make it work...

$this->Widget('ext.highcharts.HighchartsWidget', array(
	'options'=>array(
		'global' => array('useUTC' => 'false'),
...

Not working for me.

Any ideas?



Hi, I'm new in Yii and I had this problem too, but I solved it by adding the code from Hihgcharts examples to disable UTC:
            'series' => array(
                array(
                    'name' => 'Temperatura',
                    'data' => "js:(function(){
                            Highcharts.setOptions({
                                global: {
                                useUTC: false
                                }
                            });
.
.
.
})()


I put that code when I'm loading the series values, but you can add it in whereever you load a javascript, it could be in an event like this:

'events' => array(
                    'load' => 'js:function(){
                            Highcharts.setOptions({
                                global: {
                                useUTC: false
                                }
                            });
                    }'
                ),


Good luck, sorry for my english :P its the fastest solution I found, but there might be better ones.
0

#52 User is offline   José Yovany 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 19-October 12
  • Location:Oaxaca, México

Posted 28 November 2012 - 07:16 PM

View Postdominus, on 17 September 2012 - 12:45 PM, said:

Hi Milo, I'm having problems using the events for the chart, It throws me an error in jquery, I used like this:

$this->Widget('ext.highcharts.HighchartsWidget', array(
                'options' => array(
                    'chart'=>array('events'=>array('load'=>'function(event) {
                                                               alert ("Chart loaded");')),
                ));



can you please help me with this? is urgent



Try

js:function(){


hope it work... :D
0

#53 User is offline   bmsrox 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 03-August 11

Posted 05 March 2013 - 08:44 AM

Hi,

It's possible use multiple series dynamic (live) in this extension?

Give me an exemple please.
0

#54 User is offline   Maurice_ 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-February 13

Posted 19 April 2013 - 05:12 AM

It takes a very long period of time until my graph is calculated. My browser hangs at that time. Here is my source code:

$this->Widget('ext.highcharts.HighchartsWidget', array(
   'options'=>array(
      'chart'    => array('type' =>'bar'),
      'title'    => array('text' => 'Historic World Population by Region'),
      'subtitle' => array('text' => 'Wikipedia.org'),
      'xAxis'    => array(
                      'categories' => array('Africa', 'America', 'Asia', 'Europe', 'Oceania'),
                      'title' => array('text' =>'null'),
                    ),
      'yAxis'     => array(
                       'min' => '0',
                       'title' => array(
                           'text' => 'Population (millions)',
                           'align' => 'high',
                        ),
                        'labels' => array('overflow' => 'justify'),
                ),
       'tooltip' => array('valueSuffix' => 'millions'),
       'plotOptions' => array('bar' => array('dataLabels' => array('enabled' => true))),
       'legend' => array(
                  'layout' => 'vertical',
                  'align' => 'right',
                  'verticalAlign' => 'top',
                  'x' => -100,
                  'y' => 100,
                  'floating' => true,
                  'borderWidth' => 1,
                  'backgroundColor' => '#FFFFFF',
                  'shadow' => true,
                ),
         'credits' => array('enabled' => 'false'),
         'series' => array(array(
                         'name' => 'Year 1800',
                         'data' => array(
                                 array(107),
                                 array(31),
                                 array(635),
                                 array(203),
                                 array(2)
                         ),
                     ),    
                     array(
                         'name' => 'Year 1900',
                         'data' => array(
                                 array(133),
                                 array(156),
                                 array(947),
                                 array(408),
                                 array(6)
                         ),
                     ),
                     array(
                         'name' => 'Year 1900',
                         'data' => array(
                                 array(973),
                                 array(914),
                                 array(4054),
                                 array(732),
                                 array(34)
                         ),
                     ),
             )
   )
));


Any ideas?
0

#55 User is offline   Armando 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 11-November 08
  • Location:Brazil - Rio de Janeiro

Posted 26 April 2013 - 08:59 AM

I have a modal (bootstrap) with a pie graph and I want to show it when onmouseover.
The modal appears empty. How to use the "redraw ()" in this case?
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

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