<php

include_once "environment.php";
use phpRGraph\rgraph_chart;
use phpRGraph\rgraph_options;

// rgraph chart
$template = "default.php";
$draw_option = "draw();";
$width = "350";
$height = "300";
$data = array( array(40,50,80,30,50,60,70), 
               array(30,40,70,20,40,50,60) );
$labels = array('Monday','Tuesday','Wednesday','Thursday','Friday',
                'Saturday','Sunday');

$chart = new rgraph_chart("cvs", $data, "Bar");
$chart->rearrangeData();

$options = new rgraph_options("bar_3d.ini");
$options->set_option("title", "Collecting Money for Child Health");
$options->set_gradientColors(array("#696","#966"), array("#0f0","#f00"));
$options->set_option("xaxisLabels", $labels);
$options->set_option("tooltipsEvent", "onmousemove");
$options->set_tooltip($chart->get_data(), "#val#$<br>on #label#");
$chart->set_options($options);

$rgraph_json = $chart->toString();

$chart_script = "";
$event_script = "";
include_once ($templates . $template);

?>