<?php
include_once "environment.php";
use phpRGraph\rgraph_chart;
use phpRGraph\rgraph_options;
// rgraph chart
$template = "default.php";
$draw_option = "grow()";
$width = "600";
$height = "300";
$labels = array('John','Luke','Pete','Jane','Fred');
$chart = new rgraph_chart("cvs", null, "Bipolar");
$chart->set_left(array(4,6,3,5,8));
$chart->set_right(array(4,6,5,9,2));
$options = new rgraph_options();
$options->set_option("title", "3d Bipolar chart");
$options->set_gradientColors(array("#696","#966"), array("#0f0","#f00"));
$options->set_option("xaxisLabels", $labels);
$options->set_option("variant","3d");
$options->set_option("marginBottom",80);
$options->set_option("margin", 5);
$options->set_option("scaleZerostart",true);
$draw_option .= $options->getResponsiveFunction(array(0.4,990,1200,$width,$height));
$chart->set_options($options);
$rgraph_json = $chart->toString();
$chart_script = "";
$event_script = "";
include_once ($templates . $template);
?>