@@ -146,14 +146,27 @@ Example:
146
146
Whith this simple code you will generate the most simplest graph:
147
147
148
148
![ Simple graph bar] ( https://github.com/vivesweb/graph-php/blob/main/samplesimple.png?raw=true )
149
+
150
+ Example with x & y values:
151
+
152
+ $graph = new graph();
153
+ $graph->bar( [10, 20, 30, 40], [1, 4, 9, 16] );
154
+ $graph->title("With X & Y Values"); // Set the title of the bar. See title() method
155
+ echo '<img src="'.$graph->output_gd_png_base64( ).'" >'; // Echo img raw data in html page
156
+
157
+ Whith this simple code you will generate the most simplest graph:
158
+
159
+ ![ Simple graph bar with X & Y values] ( https://github.com/vivesweb/graph-php/blob/main/samplexyvalues.png?raw=true )
160
+
161
+
149
162
150
163
- ** SET GRAPH TITLE:**
151
164
152
165
* $graph->title( $title );*
153
166
154
167
* $graph->set_title( $title ); // synonymous of title()*
155
168
156
- This method set the graph title
169
+ This method set the graph TITLE
157
170
158
171
$title: String with the title
159
172
@@ -167,6 +180,30 @@ Example:
167
180
Whith this simple code you will generate Simple Bar graph with title:
168
181
169
182
![ Simple graph bar with title] ( https://github.com/vivesweb/graph-php/blob/main/sampletitle.png?raw=true )
183
+
184
+ - ** SET GRAPH Y LABEL:**
185
+
186
+ * $graph->ylabel( $ylabel );*
187
+
188
+ * $graph->set_ylabel( $ylabel ); // synonymous of ylabel()*
189
+
190
+ This method set the graph Y LABEL
191
+
192
+ $ylabel: String with the Y LABEL
193
+
194
+ Example:
195
+
196
+ $graph = new graph();
197
+ $graph->bar( [1, 2, 3, 4] );
198
+ $graph->ylabel( 'Here your graph Y LABEL' );
199
+ echo '<img src="'.$graph->output_gd_png_base64( ).'" >'; // Echo img raw data in html page
200
+
201
+ Whith this simple code you will generate Simple Bar graph with Y label:
202
+
203
+ ![ Simple graph bar with Y LABEL] ( https://github.com/vivesweb/graph-php/blob/main/sampleylabel.png?raw=true )
204
+
205
+
206
+
170
207
171
208
172
209
0 commit comments