I've been trying libchart in a project named "laporan". I created a sub-folder named "laporan" in "htdocs" (htdocs/laporan). Then I copied the "libchart" folder into my project folder (htdocs/laporan/libchart). And of course, I created a folder named "generated" in my project folder (htdocs/laporan/generated). The "generared" folder is to contain JPG/PNG files generated by libchart.
Up to this point, I think I have been correct.
Thus, I created a file named "barchart.php" in htdocs/laporan. The php file is as follows:
$chart = new VerticalBarChart(500, 250);