26 @require_once(
"../class/config.php");
27 if ((@include_once
'Image/Graph.php') === FALSE) {
28 echo
"<p class=\"alert alert-warning\">". _(
"Image_Graph not installed. use 'aptitude install php-pear' then 'pear install --alldeps Image_Graph-devel' to see the graph.").
"</p>";
32 $db->query(
"SELECT COUNT(login) AS count,date_format(created, '%Y-%m') as month FROM `membres` where created is NOT null GROUP BY month ORDER BY month ASC");
34 $Graph =& Image_Graph::factory(
'graph', array(800, 600));
36 Image_Graph::vertical(
37 Image_Graph::factory(
'title', array(_(
'Account creation per month'), 12)),
38 Image_Graph::vertical(
39 $Plotarea = Image_Graph::factory(
'plotarea'),
40 $Legend = Image_Graph::factory(
'legend'),
47 $Legend->setPlotarea($Plotarea);
49 $total =& Image_Graph::factory(
'Image_Graph_Dataset_Trivial');
50 $total->setName(_(
'before the month'));
51 $units =& Image_Graph::factory(
'Image_Graph_Dataset_Trivial');
52 $units->setName(_(
'during the month'));
55 while (
$db->next_record()) {
58 $i +=
$db->f(
'count');
64 $AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X);
65 $AxisX->setLabelOption(
'showoffset', 1);
66 $AxisX->setLabelInterval(2);
69 $Plot->setLineColor(
'gray');
72 $FillArray =& Image_Graph::factory(
'Image_Graph_Fill_Array');
81 $Marker =&
$Plot->addNew(
'Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y);
85 $Plot->setDataSelector(Image_Graph::factory(
'Image_Graph_DataSelector_NoZeros'));
while($db->next_record()) $Datasets[]