<?php
require_once("../conf.php");
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>phpChart - Basic Chart</title>
</head>
<body>
<?php
$csvdata = file_get_contents("https://c9.io/taiiwo/js_vne/workspace/moneylog.csv");
//convert to correct format
$linebyline = explode('\n', $csvdata);
foreach $linebyline as $line{
line = explode(', ', $line);
}
$graphme = array();
for ($i = 0; $i < strlen($linebyline)) {
foreach $linebyline as $line{
$graphme->append(array());
$graphme[$i]->append($line[$i]);
}
}
$pc = new C_PhpChartX($graphme,'basic_chart');
$pc->draw();
?>
</body>
</html>