This bar chart has 2 data series with 7 values each. To have a correct appearance for the chart, the data must be rearranged to 7 datagroups with two data values in each group. This is done by calling method "rgraph_chart::rearrangeData()".
In addition to this a context-menu has been requested. If You right-click into the chart, it will open and gives you the options to send an email to me.
<?php

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

// rgraph chart
$template = "default.php";
$draw_option = "draw();";
$width = "600";
$height = "350";

$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);

$data = $chart->rearrangeData();

$options = new rgraph_options("bar_3d.ini");
$options->set_option("title", "3d Bar chart with rearranged Data");
$options->set_gradientColors(array("#696","#966"), array("#0f0","#f00"));
$options->set_option("colorsSequential", false);
$options->set_option("xaxisLabels", $labels);
$options->set_option("yaxisScaleMax",90);
$options->set_option("contextmenu", array(array("© jschmidt-systemberatung.de", "" ),
                      null, array("Send Email","sendEmail")));
$options->set_option("marginBottom",85);
$options->set_option("key", array("John", "Mary"));
$options->set_option("keyPosition","graph");
$options->set_option("keyPositionY",60);
$options->set_option("keyPositionX",300);
$options->set_tooltip($chart->get_data(), "#key# earned #val#$<br>on #label#");
$chart->set_options($options);
$rgraph_json = $chart->toString();

$chart_script = "function sendEmail ()
 {  window.location.href = 'mailto:joachim.schmidt@jschmidt-systemberatung.de'; }";
$event_script = "";

include_once ($templates . $template);
?>