දැන් අපි බලමු මේ වගේ graph 1ක් කොහොමද අදින්නේ කියලා.
මේකට අපි php file 1ක් හදාගන්න ඔනි අපේ බාගත්තු library folder 1 ඇතුලේ. අපි ඒක graph.php කියලා save කරමු. දැන් ඒක open කරලා මෙන්න මේ code 1 paste කරන්න ඔනි.
<?php
include('phpgraphlib.php');
$graph = new PHPGraphLib(500,350);
$data = array(586, 535, 433, 623, 532, 732, 544, 623, 778, 878, 787, 543, 832);
$graph->addData($data);
$graph->setTitle(' All Students attendance in UWU for 1 year');
$graph->setGradient('red', 'maroon');
$graph->createGraph();
?>
graph.php file 1 වෙන තැනක save කලානම් library file එකේ path 1 include1ට දෙන්න. මේ විදියට sequence 1කට යන තොරතුරු සමූහයකට $data = array එකේ data වෙනස් කර කර graph 1ක් හදාගන්න අපිට දැන් පුලුවන් නේද?
තව ගොඩාක් වැඩ මෙකේ තියෙනවා. එවා ඔක්කොම ටිකෙන් ටික මං ලියන්නම්කෝ. දැන්නම් මටත් නිදි මතයි. එහෙනම් හැමෝටම ජයවේවා...!!!
No comments:
Post a Comment