Many Drupal Related Examples can be found here...
Sample Fusion Chart Program in Drupal
function fp2_example() {
$info->data= array();
while($res2=db_fetch_object($qry2)){
$info->data[]=array('India','32');
}
$info->chart_type = 'Column 3D';
$count2=count($info->data);
$info->settings = array('subCaption' => 'Country',
'DecimalPrecision' => 0,
'rotateNames'=>1, 'bgColor' => 'c1fbb6', 'showNames' => 1, 'showValues'=> 0,
);
for ($i=0; $i<$count2 ; $i++) {
$info->attributes['color'][] = dechex(rand(0, 255)) . dechex(rand(0, 255)) . dechex(rand(0, 255));
}
$info->width = 300;
$info->height =300;
for($i=0;$i<$count2;$i++)
{
$val3= $info->data[$i][0];
}
$out2 .=theme('fusionchart', $info);
return $out2;
}
No comments:
Post a Comment