Installation
Last modified: September 17, 2009 - 22:36
- Download and install Open Flash Chart 2 API module
- Download the latest Open Flash Chart 2 package from http://teethgrinder.co.uk/open-flash-chart-2/downloads.php
-
Extract the package, put the
open-flash-chart.swffile in the module's directory. The directory layout should look like this:ofc_api
|-- ofc_api.info
|-- ofc_api.module
|-- swfobject.js
|-- open-flash-chart.swf
|-- ... -
If you want to use an external library e.g. the one that comes with Open Flash Chart 2 package, copy the
php-ofc-librarydirectory into the module's directory as well. The resulting directory layout should look like this:ofc_api
|-- ofc_api.info
|-- ofc_api.module
|-- swfobject.js
|-- open-flash-chart.swf
|-- php-ofc-library
|-- open-flash-chart.php
|-- ...
|-- ... -
Configure Open Flash Chart 2 API by going to
/admin/settings/ofc_api - You can verify the installation by creating a new Page or Story, set input format to PHP code and put the following code in the body:
<?php
print ofc_api_render();
?>Click the "Preview" button, if the sample chart shows up then you're good to go :)
