Set($data); // Add the table to the graph $graph->Add($table); // ... and send back the table to the client $graph->Stroke(); ?>