Esempio n. 1
0
 /**
  * Pass in some text for each label. This can contain magic variables "#val#" which
  * will get replaced with the value for that Y axis label. Useful for:
  * - "£#val#"
  * - "#val#%"
  * - "#val# million"
  * 
  * @param $text as string.
  */
 function set_label_text($text)
 {
     $tmp = new y_axis_labels();
     $tmp->set_text($text);
     $this->labels = $tmp;
 }
    $tags->append_tag(new ofc_tag($x, $v->top, $statuscolor[$key]));
    $x++;
}
$bar = new bar_3d();
$bar->set_values(array_values($data));
$chart->add_element($bar);
$chart->add_element($tags);
//x-label
$xal = new x_axis_labels();
$tmp = array();
foreach ($statustext as $status => $text) {
    $tmp[] = new x_axis_label($text, $statuscolor[$status], $xfs, 15);
}
$xal->set_labels($tmp);
$xal->set_size($xfs);
$x = new x_axis();
$x->set_offset(true);
$x->set_labels($xal);
$x->set_3d(5);
$x->colour = '#909090';
$chart->set_x_axis($x);
//y-label
$yal = new y_axis_labels();
$yal->set_size($yfs);
$y = new y_axis();
$y->set_labels($yal);
$y->set_range(0, ceil($y_max / $step) * $step, $step);
$chart->set_y_axis($y);
//draw data for chart
echo $chart->toString();
require_once 'confy_close.php';