public function get_data_pie()
{
$this->load->plugin('ofc2');
$title = new title( $title );
$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') );
$sql = mysql_query("SELECT gender, count(gender) AS number FROM students
GROUP BY gender");
$max = 0;
while($row = mysql_fetch_array($sql))
{
$data[] = (intval($row['number']));
$label[] = (intval($row['gender'])); to show "Male","Female" Labels on the respective segments
}
$pie->set_values( array(new pie_value($data,$label) ); this segment is what needs a patch