-
Notifications
You must be signed in to change notification settings - Fork 31
FlashChart Helper
FlashChartHelper documentation
The sole purpose of this helper is to integrate OpenFlashChart2 with cake in an easy to use way. It is based on the work of Joaquin Windmuller and hist article on the bakery . It also replaces the behavior made by the same authors as this helper, ChartableBehavior.
- Line, Line Dot, Line Hollow,
- Bar, Bar Filled, Bar Glass, Bar 3D, Bar Sketch, Bar Stack
- Area Line, Area Hollow,
- Pie Chart
- Scatter, Scatter Line
- Radar Line, Radar Area (called radar and radar_filled)
(Horizontal Bar is not yet implemented)
Make sure you have these folders and files in the correct locations:
- /app/views/helpers/flash_chart.php
- /app/views/helpers/flash.php
- /app/vendors/flashchart/open-flash-chart.php
- /app/vendors/flashchart/37 other files at the time of this writing
- /app/webroot/flash/open-flash-chart.swf
- /app/webroot/js/swfobject.js
- /app/webroot/js/json/json2.js (not used if you use prototype)
Add the helper to your controllers “helpers” property:
var $helpers = array('Html','FlashChart');
If you’re allready using prototype in your application, make sure you tell the helper this through the begin call:
echo $flashChart->begin(array('prototype'=>true));
For the most updated API, check the file. Online version may be found [FlashChartHelperApi here] and on the [http://bakery.cakephp.org cake bakery].
- [ExampleMinimum Minimum usage. You will always need at least this.]
- [Example2Datasets Minimum with 2 datasets.]
- [ExampleCharts Minimum with 2 seperate charts.]
- [ExampleCustomize Customizing your chart and setting labels.]
- [Example4 Charting non-numeric data and labels on y-axis.]
- [ExampleScatter Scatter and loading message.]
- [ExampleRadar Radar]
- [ExampleStacked Stacked Bars, prototype, multiple charts and dom id]