Examples
All these examples are from teethgrinder.co.uk. Visit the page, it hosts even some more examples and tutorials.
This is the code that was used to generate the $chart object which we passed to this view:
$title = new title( 'Pork Pie, Mmmmm' );
$pie = new pie();
$pie->set_alpha(0.6);
$pie->set_start_angle( 35 );
$pie->add_animation( new pie_fade() );
$pie->set_tooltip( '#val# of #total#<br>#percent# of 100%' );
$pie->set_colours( array('#1C9E05','#FF368D') );
$pie->set_values( array(2,3,4,new pie_value(6.5, "hello (6.5)")) );
$chart = new open_flash_chart();
$chart->set_title( $title );
$chart->add_element( $pie );
$chart->x_axis = null;
return $chart;
This view uses the following code to render the graph:
$this->widget(
'application.extensions.OpenFlashChart2Widget.OpenFlashChart2Widget',
array(
'chart' => $chart,
'width' => '100%'
));