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.
Requirements ¶
- Yii 1.0 or above
- PHP 5.1 or above
Usage ¶
To use this widget, you may insert the following code in a view:
$this->Widget('ext.highstock.HighstockWidget', array(
'options'=>array(
'theme'=>'grid',
'rangeSelector'=>array('selected'=>1),
'title'=>array('text'=>'USD to EUR exchange rate'),
'xAxis'=>array('maxZoom'=>14 * 24 * 3600000 ),
'yAxis'=>array('title'=>array('text'=>'Exchange rate')),
'series'=>array(array('name'=>'USD to EUR','data'=>'js:usdeur')),
)));
Yii::app()->clientscript->registerScript('highstock',"
var usdeur = [
[Date.UTC(2003,8,24),0.8709],
[Date.UTC(2003,8,25),0.872],
[Date.UTC(2003,8,26),0.8714],
[Date.UTC(2011,4,10),0.6945]
];
",CClientScript::POS_HEAD);
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.