OpenFlashChart2Widget is a simple wrapper for OpenFlashChart2 objects. It was inspired by the extension YiiOpenFlashChart, but doesn’t try to provide a new API to the open flash chart library. Instead, the Widget that comes with this extension takes an object, created using open flash chart’s PHP language binding. This has the benefit, that this API is already documented, tutorials and examples are available, and the open flash chart community knows the API and can help.
[size="5"]Requirements[/size]
I don’t know for sure what the minimal requirements are. I developed the extension using Yii 1.1.5, but since it doesn’t do anything fancy, I’d guess it will also work with much older versions of Yii.
However, the demo application, that is included in the extension, uses action parameter binding. So this will need at least Yii v1.1.4
[size="5"]Installation[/size]
-
Extract folder "OpenFlashChart2Widget" in the release file to protected/extensions
-
Configure your application to find OpenFlashChart2Loader
[size="5"]Usage[/size]
First of all, let the OpenFlashChart2Loader initialize everything
OpenFlashChart2Loader::load();
Second, create the open flash chart object using their PHP language binding
$bar = new bar_dome();
$bar->set_values( array(9,8,7,6,5,4,3,2,1) );
$chart = new open_flash_chart();
$chart->set_title( new title("MyChart") );
$chart->add_element( $bar );
Third, instantiate the widget and pass the $chart object to it.
$this->widget(
'application.extensions.OpenFlashChart2Widget.OpenFlashChart2Widget',
array(
'chart' => $chart,
'width' => '100%'
)
);
[size="5"]Resources[/size]
-
OpenFlashChart2Widget demo site
[size="5"]Change Log[/size]
March 27, 2011
Minor Bug fix release - v1.0.1
-
loader doesn’t touch php include path any longer
-
demo app validates user input
February 21, 2011
- Initial release