diff --git a/htdocs/bargraph.class.php b/htdocs/bargraph.class.php index 3643e1914d6..24051b2faba 100644 --- a/htdocs/bargraph.class.php +++ b/htdocs/bargraph.class.php @@ -1,6 +1,6 @@ - * Copyright (c) 2004 Laurent Destailleur + * Copyright (c) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,18 +20,30 @@ * $Source$ */ -include_once DOL_DOCUMENT_ROOT . "/graph.class.php"; +/** + \file htdocs/bargraph.class.php + \brief Fichier de la classe de gestion de graphs phplot + \version $Revision$ +*/ + +include_once(DOL_DOCUMENT_ROOT."/graph.class.php"); + + +/** + \class BarGraph + \brief Classe permettant la gestion des graphs phplot +*/ class BarGraph extends Graph { var $db; var $errorstr; - /** - * Initialisation - * Retour: 0 si ko, 1 si ok - */ + /** + * \brief Initialisation + * \return int Retour: 0 si ko, 1 si ok + */ function BarGraph($data=array()) { $modules_list = get_loaded_extensions(); @@ -47,8 +59,6 @@ class BarGraph extends Graph $this->data = $data; - include_once(DOL_DOCUMENT_ROOT."/includes/phplot/phplot.php"); - $this->bgcolor = array(235,235,224); //$this->bgcolor = array(235,235,200); $this->bordercolor = array(235,235,224); @@ -79,8 +89,10 @@ class BarGraph extends Graph } /** - * Dessine le graphique - * + * \brief Génère le fichier graphique sur le disque + * \param file Nom du fichier image + * \param data Tableau des données + * \param title Titre de l'image */ function draw($file, $data, $title='') { $this->prepare($file, $data, $title); @@ -106,8 +118,7 @@ class BarGraph extends Graph $this->graph->SetNumVertTicks(substr($this->MaxValue,0,1)); } - - + // Génère le fichier $file $this->graph->DrawGraph(); } } diff --git a/htdocs/graph.class.php b/htdocs/graph.class.php index 37bdc6cd164..1e292cef550 100644 --- a/htdocs/graph.class.php +++ b/htdocs/graph.class.php @@ -19,14 +19,30 @@ * $Source$ */ +/** + \file htdocs/graph.class.php + \brief Fichier de la classe mère de gestion des graph phplot + \version $Revision$ +*/ + +include_once(DOL_DOCUMENT_ROOT."/includes/phplot/phplot.php"); + + +/** + \class Graph + \brief Classe mère permettant la gestion des graph phplot +*/ + class Graph { var $db; var $errorstr; /** - * Prépare le graphique - * + * \brief Prépare le graphique + * \param file Nom du fichier image + * \param data Tableau des données + * \param title Titre de l'image */ function prepare($file, $data, $title='') {