<?php

include_once "environment.php";

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

$file = $filedir[0] . "RGraph/samples/gantt.json";
$file_data = rgraph_chart::getDataFromFile($file);
$data = $file_data['data'];

$chart = new rgraph_chart("cvs",$data,"Gantt");

$options = new rgraph_options("default.ini");
$options->set_option("title", "A basic Gantt chart");
$options->set_option("xaxisLabels", $file_data['labels']);
$options->set_option("xaxisScaleMax", 130);
$options->set_option("textAccessible", false);
$options->set_option("backgroundGridVlinesCount", 4);
$options->set_tooltip_formatted($data,"#label#: Start: #val0#, Duration: #val1#, (#val2#% Complete)", "Gantt");

$chart->set_options($options);
$rgraph_json = $chart->toString();

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