• R/O
  • SSH
  • HTTPS

psgraph: 提交


Commit MetaInfo

修訂50 (tree)
時間2009-08-02 16:58:05
作者hirohitohigashi

Log Message

add comment.

Change Summary

差異

--- trunk/psgraph_pie.php (revision 49)
+++ trunk/psgraph_pie.php (revision 50)
@@ -16,7 +16,7 @@
1616
1717 //================================================
1818 /*!@brief
19- * パイチャート
19+ * 円グラフ
2020 *
2121 */
2222 class PSGraphPie extends PSGraph_util
@@ -100,9 +100,9 @@
100100 $this->draw_common1();
101101
102102 /*
103- * draw pie.
103+ * draw each pieces.
104104 */
105- $this->Output->printf( "\n<!-- draw main pie -->\n" );
105+ $this->Output->printf( "\n<!-- draw pie chart -->\n" );
106106
107107 $x1 = 0;
108108 $y1 = -$r;
@@ -124,6 +124,7 @@
124124 /*
125125 * draw legend
126126 */
127+ $this->Output->printf( "\n<!-- draw legends -->\n" );
127128 if( $this->AtLegend ) {
128129 if( !isset( $this->AtLegend['Y'] ) ) {
129130 $this->AtLegend['Y'] = ($this->Height - count( $this->DataSeries )
@@ -147,26 +148,33 @@
147148
148149 $this->draw_common2();
149150 }
150-
151-
152-
153-
154151 }
155152
156153
157154
158155 //================================================================
159-/*!
156+/*!@brief
157+ * 円グラフ用データコンテナ
160158 *
161159 */
162160 class PSGraph_container_pie
163161 {
164- public $DataValue;
165- public $Percentage;
166- public $Legend;
167- public $AtPiece = array( 'StrokeWidth'=>1, 'Stroke'=>'black' );
162+ public $DataValue; //!< データ値
163+ public $Percentage; //!< 全体率
164+ public $Legend; //!< 凡例文字列
165+ public $AtPiece = array( 'StrokeWidth'=>1, 'Stroke'=>'black' ); //!< グラフアトリビュート
168166
169167
168+ //================================================================
169+ /*! constructor
170+ *
171+ *@param value データ値
172+ *@param legend 凡例文字列
173+ *@param color 色
174+ *@note
175+ * データ列を管理するのではなく、一つの値を管理する。
176+ * 折れ線用などとは思想が違うので注意。
177+ */
170178 function __construct( $value, $legend, $color )
171179 {
172180 $this->DataValue = $value;
@@ -174,6 +182,12 @@
174182 $this->AtPiece['Fill'] = $color;
175183 }
176184
185+
186+ //================================================================
187+ /*! 色の指定
188+ *
189+ *@param color 色
190+ */
177191 function setColor( $color )
178192 {
179193 $this->AtPiece['Fill'] = $color;
Show on old repository browser