Development:lib/graphlib.php
From MoodleDocs
Moodle's graphlib.php is 'Class: Graph Drawing Class 2' by Herman Veluwenkamp with a couple of small modifications.
The modifications tell graphlib where to fetch the fonts for the current language.
There are some examples of how to use the class to make various graphs at the bottom of this page.
In the examples you need to replace :
include 'graph.php';
with :
include '../config.php'; include $CFG->dirroot.'/lib/graphlib.php';
You don't need this assignment in Moodle :
$chart->parameter['path_to_fonts'] = 'fonts/'; // path to where fonts are stored
This is handled properly by Moodle modifications of the class for the current language.