This extension 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.
Requirements ¶
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
Installation ¶
- Extract folder "OpenFlashChart2Widget" in the release file to protected/extensions
- Configure your application to find OpenFlashChart2Loader
Usage ¶
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%'
)
);
Resources ¶
- OpenFlashChart2Widget demo site
- Download v1.0.1
- Repository (svn)
- Comments, suggestions and bug reports
Change Log ¶
November 2, 2011
Configured anonymous read access for the repository containing the widget and the demo
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
Params
Hi,
Thanks for the extension.
I think it would be nice to be able to add:
{
"wmode" : "opaque"
}
to params of the widget.
downloadble
can you make this saved offline or exported to img perhaps
feature requests
Hi,
@undsoft: first of all: sorry for not answering for quite some time. I've searched for information about that wmode param, and I think it would be nice to have. However, I also read, that it might cause some trouble (see http://groups.google.com/group/swfobject/msg/412f90e9a96694ec?pli=1). This is why I am not sure if "opaque" should become default or not. Do you have any experience with this?
@aqge: I'm not sure what you mean with saving this offline? About the image export: I know OpenFlashChart2 is capable of exporting a chart to an image (.png). From what I found in the docs, it is possible to post the exported image back to the server (see http://teethgrinder.co.uk/open-flash-chart-2/adv-upload-image.php) using the javascript bindings. This is not exactly what you ask for, but maybe it would be possible to extend the javascript API/ provide a new one, that allows saving the exported image on the client.
Pie-Chart
Hello,
I try to render pie-chart, but no success.
I hope some one of you have knowlage how to do that.
Tnx.
Re: Pie-Chart
Did you take a look at the examples?
Basic pie: http://trunk-is-golden.com/OpenFlashChart2WidgetDemo/index.php?r=examples/index&exampleId=pie-chart.php
Pie with some customizations: http://trunk-is-golden.com/OpenFlashChart2WidgetDemo/index.php?r=examples/index&exampleId=pie-chart-label-styles.php
Pie-Chart
Ben thank you !
I did not try that. Today i download openflashchart2 and i thought that i comment on that page. I didn't even realize that this is widget for openflashchart2 :)
I just download it and now i will try to use it.
Tnx very much - for now ;)
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.