@@ -14,463 +14,463 @@ |
||
14 | 14 | */ |
15 | 15 | class Ticks implements ArraySerializableInterface, JsonSerializable |
16 | 16 | { |
17 | - use ArraySerializable; |
|
18 | - |
|
19 | - /** |
|
20 | - * @var float |
|
21 | - */ |
|
22 | - private $suggestedMin; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var bool |
|
26 | - */ |
|
27 | - private $beginAtZero; |
|
28 | - |
|
29 | - /** |
|
30 | - * @var float |
|
31 | - */ |
|
32 | - private $stepSize; |
|
33 | - |
|
34 | - /** |
|
35 | - * @var bool |
|
36 | - */ |
|
37 | - private $autoSkip; |
|
38 | - |
|
39 | - /** |
|
40 | - * @var int |
|
41 | - */ |
|
42 | - private $autoSkipPadding; |
|
43 | - |
|
44 | - /** |
|
45 | - * @var Expr |
|
46 | - */ |
|
47 | - private $callback; |
|
48 | - |
|
49 | - /** |
|
50 | - * @var bool |
|
51 | - */ |
|
52 | - private $display; |
|
53 | - |
|
54 | - /** |
|
55 | - * @var string |
|
56 | - */ |
|
57 | - private $fontColor; |
|
58 | - |
|
59 | - /** |
|
60 | - * @var string |
|
61 | - */ |
|
62 | - private $fontFamily; |
|
63 | - |
|
64 | - /** |
|
65 | - * @var int |
|
66 | - */ |
|
67 | - private $fontSize; |
|
68 | - |
|
69 | - /** |
|
70 | - * @var string |
|
71 | - */ |
|
72 | - private $fontStyle; |
|
73 | - |
|
74 | - /** |
|
75 | - * @var int |
|
76 | - */ |
|
77 | - private $labelOffset; |
|
78 | - |
|
79 | - /** |
|
80 | - * @var int |
|
81 | - */ |
|
82 | - private $maxRotation; |
|
83 | - |
|
84 | - /** |
|
85 | - * @var int |
|
86 | - */ |
|
87 | - private $minRotation; |
|
88 | - |
|
89 | - /** |
|
90 | - * @var bool |
|
91 | - */ |
|
92 | - private $mirror; |
|
93 | - |
|
94 | - /** |
|
95 | - * @var int |
|
96 | - */ |
|
97 | - private $padding; |
|
98 | - |
|
99 | - /** |
|
100 | - * @var bool |
|
101 | - */ |
|
102 | - private $reverse; |
|
103 | - |
|
104 | - /** |
|
105 | - * @var int |
|
106 | - */ |
|
107 | - private $max; |
|
108 | - |
|
109 | - /** |
|
110 | - * @return float |
|
111 | - */ |
|
112 | - public function getSuggestedMin() |
|
113 | - { |
|
114 | - return $this->suggestedMin; |
|
115 | - } |
|
116 | - |
|
117 | - /** |
|
118 | - * @param float $suggestedMin |
|
119 | - * |
|
120 | - * @return $this |
|
121 | - */ |
|
122 | - public function setSuggestedMin($suggestedMin) |
|
123 | - { |
|
124 | - $this->suggestedMin = floatval($suggestedMin); |
|
125 | - |
|
126 | - return $this; |
|
127 | - } |
|
128 | - |
|
129 | - /** |
|
130 | - * @return bool |
|
131 | - */ |
|
132 | - public function isBeginAtZero() |
|
133 | - { |
|
134 | - return $this->beginAtZero; |
|
135 | - } |
|
136 | - |
|
137 | - /** |
|
138 | - * @param bool $beginAtZero |
|
139 | - * |
|
140 | - * @return $this |
|
141 | - */ |
|
142 | - public function setBeginAtZero($beginAtZero) |
|
143 | - { |
|
144 | - $this->beginAtZero = boolval($beginAtZero); |
|
145 | - |
|
146 | - return $this; |
|
147 | - } |
|
148 | - |
|
149 | - /** |
|
150 | - * @return float |
|
151 | - */ |
|
152 | - public function getStepSize() |
|
153 | - { |
|
154 | - return $this->stepSize; |
|
155 | - } |
|
156 | - |
|
157 | - /** |
|
158 | - * @param float $stepSize |
|
159 | - * |
|
160 | - * @return $this |
|
161 | - */ |
|
162 | - public function setStepSize($stepSize) |
|
163 | - { |
|
164 | - $this->stepSize = floatval($stepSize); |
|
165 | - |
|
166 | - return $this; |
|
167 | - } |
|
168 | - |
|
169 | - /** |
|
170 | - * @return bool |
|
171 | - */ |
|
172 | - public function isAutoSkip() |
|
173 | - { |
|
174 | - return $this->autoSkip; |
|
175 | - } |
|
176 | - |
|
177 | - /** |
|
178 | - * @param bool $autoSkip |
|
179 | - * |
|
180 | - * @return $this |
|
181 | - */ |
|
182 | - public function setAutoSkip($autoSkip) |
|
183 | - { |
|
184 | - $this->autoSkip = boolval($autoSkip); |
|
185 | - |
|
186 | - return $this; |
|
187 | - } |
|
188 | - |
|
189 | - /** |
|
190 | - * @return int |
|
191 | - */ |
|
192 | - public function getAutoSkipPadding() |
|
193 | - { |
|
194 | - return $this->autoSkipPadding; |
|
195 | - } |
|
196 | - |
|
197 | - /** |
|
198 | - * @param int $autoSkipPadding |
|
199 | - * |
|
200 | - * @return $this |
|
201 | - */ |
|
202 | - public function setAutoSkipPadding($autoSkipPadding) |
|
203 | - { |
|
204 | - $this->autoSkipPadding = intval($autoSkipPadding); |
|
205 | - |
|
206 | - return $this; |
|
207 | - } |
|
208 | - |
|
209 | - /** |
|
210 | - * @return Expr |
|
211 | - */ |
|
212 | - public function getCallback() |
|
213 | - { |
|
214 | - return $this->callback; |
|
215 | - } |
|
216 | - |
|
217 | - /** |
|
218 | - * @param string $callback |
|
219 | - * |
|
220 | - * @return $this |
|
221 | - */ |
|
222 | - public function setCallback($callback) |
|
223 | - { |
|
224 | - $this->callback = new Expr(strval($callback)); |
|
225 | - |
|
226 | - return $this; |
|
227 | - } |
|
228 | - |
|
229 | - /** |
|
230 | - * @return bool |
|
231 | - */ |
|
232 | - public function isDisplay() |
|
233 | - { |
|
234 | - return $this->display; |
|
235 | - } |
|
236 | - |
|
237 | - /** |
|
238 | - * @param bool $display |
|
239 | - * |
|
240 | - * @return $this |
|
241 | - */ |
|
242 | - public function setDisplay($display) |
|
243 | - { |
|
244 | - $this->display = boolval($display); |
|
245 | - |
|
246 | - return $this; |
|
247 | - } |
|
248 | - |
|
249 | - /** |
|
250 | - * @return string |
|
251 | - */ |
|
252 | - public function getFontColor() |
|
253 | - { |
|
254 | - return $this->fontColor; |
|
255 | - } |
|
256 | - |
|
257 | - /** |
|
258 | - * @param string $fontColor |
|
259 | - * |
|
260 | - * @return $this |
|
261 | - */ |
|
262 | - public function setFontColor($fontColor) |
|
263 | - { |
|
264 | - $this->fontColor = strval($fontColor); |
|
265 | - |
|
266 | - return $this; |
|
267 | - } |
|
268 | - |
|
269 | - /** |
|
270 | - * @return string |
|
271 | - */ |
|
272 | - public function getFontFamily() |
|
273 | - { |
|
274 | - return $this->fontFamily; |
|
275 | - } |
|
276 | - |
|
277 | - /** |
|
278 | - * @param string $fontFamily |
|
279 | - * |
|
280 | - * @return $this |
|
281 | - */ |
|
282 | - public function setFontFamily($fontFamily) |
|
283 | - { |
|
284 | - $this->fontFamily = strval($fontFamily); |
|
285 | - |
|
286 | - return $this; |
|
287 | - } |
|
288 | - |
|
289 | - /** |
|
290 | - * @return int |
|
291 | - */ |
|
292 | - public function getFontSize() |
|
293 | - { |
|
294 | - return $this->fontSize; |
|
295 | - } |
|
296 | - |
|
297 | - /** |
|
298 | - * @param int $fontSize |
|
299 | - * |
|
300 | - * @return $this |
|
301 | - */ |
|
302 | - public function setFontSize($fontSize) |
|
303 | - { |
|
304 | - $this->fontSize = intval($fontSize); |
|
305 | - |
|
306 | - return $this; |
|
307 | - } |
|
308 | - |
|
309 | - /** |
|
310 | - * @return string |
|
311 | - */ |
|
312 | - public function getFontStyle() |
|
313 | - { |
|
314 | - return $this->fontStyle; |
|
315 | - } |
|
316 | - |
|
317 | - /** |
|
318 | - * @param string $fontStyle |
|
319 | - * |
|
320 | - * @return $this |
|
321 | - */ |
|
322 | - public function setFontStyle($fontStyle) |
|
323 | - { |
|
324 | - $this->fontStyle = strval($fontStyle); |
|
325 | - |
|
326 | - return $this; |
|
327 | - } |
|
328 | - |
|
329 | - /** |
|
330 | - * @return int |
|
331 | - */ |
|
332 | - public function getLabelOffset() |
|
333 | - { |
|
334 | - return $this->labelOffset; |
|
335 | - } |
|
336 | - |
|
337 | - /** |
|
338 | - * @param int $labelOffset |
|
339 | - * |
|
340 | - * @return $this |
|
341 | - */ |
|
342 | - public function setLabelOffset($labelOffset) |
|
343 | - { |
|
344 | - $this->labelOffset = intval($labelOffset); |
|
345 | - |
|
346 | - return $this; |
|
347 | - } |
|
348 | - |
|
349 | - /** |
|
350 | - * @return int |
|
351 | - */ |
|
352 | - public function getMaxRotation() |
|
353 | - { |
|
354 | - return $this->maxRotation; |
|
355 | - } |
|
356 | - |
|
357 | - /** |
|
358 | - * @param int $maxRotation |
|
359 | - * |
|
360 | - * @return $this |
|
361 | - */ |
|
362 | - public function setMaxRotation($maxRotation) |
|
363 | - { |
|
364 | - $this->maxRotation = intval($maxRotation); |
|
365 | - |
|
366 | - return $this; |
|
367 | - } |
|
368 | - |
|
369 | - /** |
|
370 | - * @return int |
|
371 | - */ |
|
372 | - public function getMinRotation() |
|
373 | - { |
|
374 | - return $this->minRotation; |
|
375 | - } |
|
376 | - |
|
377 | - /** |
|
378 | - * @param int $minRotation |
|
379 | - * |
|
380 | - * @return $this |
|
381 | - */ |
|
382 | - public function setMinRotation($minRotation) |
|
383 | - { |
|
384 | - $this->minRotation = intval($minRotation); |
|
385 | - |
|
386 | - return $this; |
|
387 | - } |
|
388 | - |
|
389 | - /** |
|
390 | - * @return bool |
|
391 | - */ |
|
392 | - public function isMirror() |
|
393 | - { |
|
394 | - return $this->mirror; |
|
395 | - } |
|
396 | - |
|
397 | - /** |
|
398 | - * @param bool $mirror |
|
399 | - * |
|
400 | - * @return $this |
|
401 | - */ |
|
402 | - public function setMirror($mirror) |
|
403 | - { |
|
404 | - $this->mirror = boolval($mirror); |
|
405 | - |
|
406 | - return $this; |
|
407 | - } |
|
408 | - |
|
409 | - /** |
|
410 | - * @return int |
|
411 | - */ |
|
412 | - public function getPadding() |
|
413 | - { |
|
414 | - return $this->padding; |
|
415 | - } |
|
416 | - |
|
417 | - /** |
|
418 | - * @param int $padding |
|
419 | - * |
|
420 | - * @return $this |
|
421 | - */ |
|
422 | - public function setPadding($padding) |
|
423 | - { |
|
424 | - $this->padding = intval($padding); |
|
425 | - |
|
426 | - return $this; |
|
427 | - } |
|
428 | - |
|
429 | - /** |
|
430 | - * @return bool |
|
431 | - */ |
|
432 | - public function isReverse() |
|
433 | - { |
|
434 | - return $this->reverse; |
|
435 | - } |
|
436 | - |
|
437 | - /** |
|
438 | - * @param bool $reverse |
|
439 | - * |
|
440 | - * @return $this |
|
441 | - */ |
|
442 | - public function setReverse($reverse) |
|
443 | - { |
|
444 | - $this->reverse = boolval($reverse); |
|
445 | - |
|
446 | - return $this; |
|
447 | - } |
|
448 | - |
|
449 | - /** |
|
450 | - * @return int |
|
451 | - */ |
|
452 | - public function getMax() |
|
453 | - { |
|
454 | - return $this->max; |
|
455 | - } |
|
456 | - |
|
457 | - /** |
|
458 | - * @param int $max |
|
459 | - * |
|
460 | - * @return $this |
|
461 | - */ |
|
462 | - public function setMax($max) |
|
463 | - { |
|
464 | - $this->max = intval($max); |
|
465 | - |
|
466 | - return $this; |
|
467 | - } |
|
468 | - |
|
469 | - /** |
|
470 | - * @return array |
|
471 | - */ |
|
472 | - public function jsonSerialize() |
|
473 | - { |
|
474 | - return $this->getArrayCopy(); |
|
475 | - } |
|
17 | + use ArraySerializable; |
|
18 | + |
|
19 | + /** |
|
20 | + * @var float |
|
21 | + */ |
|
22 | + private $suggestedMin; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var bool |
|
26 | + */ |
|
27 | + private $beginAtZero; |
|
28 | + |
|
29 | + /** |
|
30 | + * @var float |
|
31 | + */ |
|
32 | + private $stepSize; |
|
33 | + |
|
34 | + /** |
|
35 | + * @var bool |
|
36 | + */ |
|
37 | + private $autoSkip; |
|
38 | + |
|
39 | + /** |
|
40 | + * @var int |
|
41 | + */ |
|
42 | + private $autoSkipPadding; |
|
43 | + |
|
44 | + /** |
|
45 | + * @var Expr |
|
46 | + */ |
|
47 | + private $callback; |
|
48 | + |
|
49 | + /** |
|
50 | + * @var bool |
|
51 | + */ |
|
52 | + private $display; |
|
53 | + |
|
54 | + /** |
|
55 | + * @var string |
|
56 | + */ |
|
57 | + private $fontColor; |
|
58 | + |
|
59 | + /** |
|
60 | + * @var string |
|
61 | + */ |
|
62 | + private $fontFamily; |
|
63 | + |
|
64 | + /** |
|
65 | + * @var int |
|
66 | + */ |
|
67 | + private $fontSize; |
|
68 | + |
|
69 | + /** |
|
70 | + * @var string |
|
71 | + */ |
|
72 | + private $fontStyle; |
|
73 | + |
|
74 | + /** |
|
75 | + * @var int |
|
76 | + */ |
|
77 | + private $labelOffset; |
|
78 | + |
|
79 | + /** |
|
80 | + * @var int |
|
81 | + */ |
|
82 | + private $maxRotation; |
|
83 | + |
|
84 | + /** |
|
85 | + * @var int |
|
86 | + */ |
|
87 | + private $minRotation; |
|
88 | + |
|
89 | + /** |
|
90 | + * @var bool |
|
91 | + */ |
|
92 | + private $mirror; |
|
93 | + |
|
94 | + /** |
|
95 | + * @var int |
|
96 | + */ |
|
97 | + private $padding; |
|
98 | + |
|
99 | + /** |
|
100 | + * @var bool |
|
101 | + */ |
|
102 | + private $reverse; |
|
103 | + |
|
104 | + /** |
|
105 | + * @var int |
|
106 | + */ |
|
107 | + private $max; |
|
108 | + |
|
109 | + /** |
|
110 | + * @return float |
|
111 | + */ |
|
112 | + public function getSuggestedMin() |
|
113 | + { |
|
114 | + return $this->suggestedMin; |
|
115 | + } |
|
116 | + |
|
117 | + /** |
|
118 | + * @param float $suggestedMin |
|
119 | + * |
|
120 | + * @return $this |
|
121 | + */ |
|
122 | + public function setSuggestedMin($suggestedMin) |
|
123 | + { |
|
124 | + $this->suggestedMin = floatval($suggestedMin); |
|
125 | + |
|
126 | + return $this; |
|
127 | + } |
|
128 | + |
|
129 | + /** |
|
130 | + * @return bool |
|
131 | + */ |
|
132 | + public function isBeginAtZero() |
|
133 | + { |
|
134 | + return $this->beginAtZero; |
|
135 | + } |
|
136 | + |
|
137 | + /** |
|
138 | + * @param bool $beginAtZero |
|
139 | + * |
|
140 | + * @return $this |
|
141 | + */ |
|
142 | + public function setBeginAtZero($beginAtZero) |
|
143 | + { |
|
144 | + $this->beginAtZero = boolval($beginAtZero); |
|
145 | + |
|
146 | + return $this; |
|
147 | + } |
|
148 | + |
|
149 | + /** |
|
150 | + * @return float |
|
151 | + */ |
|
152 | + public function getStepSize() |
|
153 | + { |
|
154 | + return $this->stepSize; |
|
155 | + } |
|
156 | + |
|
157 | + /** |
|
158 | + * @param float $stepSize |
|
159 | + * |
|
160 | + * @return $this |
|
161 | + */ |
|
162 | + public function setStepSize($stepSize) |
|
163 | + { |
|
164 | + $this->stepSize = floatval($stepSize); |
|
165 | + |
|
166 | + return $this; |
|
167 | + } |
|
168 | + |
|
169 | + /** |
|
170 | + * @return bool |
|
171 | + */ |
|
172 | + public function isAutoSkip() |
|
173 | + { |
|
174 | + return $this->autoSkip; |
|
175 | + } |
|
176 | + |
|
177 | + /** |
|
178 | + * @param bool $autoSkip |
|
179 | + * |
|
180 | + * @return $this |
|
181 | + */ |
|
182 | + public function setAutoSkip($autoSkip) |
|
183 | + { |
|
184 | + $this->autoSkip = boolval($autoSkip); |
|
185 | + |
|
186 | + return $this; |
|
187 | + } |
|
188 | + |
|
189 | + /** |
|
190 | + * @return int |
|
191 | + */ |
|
192 | + public function getAutoSkipPadding() |
|
193 | + { |
|
194 | + return $this->autoSkipPadding; |
|
195 | + } |
|
196 | + |
|
197 | + /** |
|
198 | + * @param int $autoSkipPadding |
|
199 | + * |
|
200 | + * @return $this |
|
201 | + */ |
|
202 | + public function setAutoSkipPadding($autoSkipPadding) |
|
203 | + { |
|
204 | + $this->autoSkipPadding = intval($autoSkipPadding); |
|
205 | + |
|
206 | + return $this; |
|
207 | + } |
|
208 | + |
|
209 | + /** |
|
210 | + * @return Expr |
|
211 | + */ |
|
212 | + public function getCallback() |
|
213 | + { |
|
214 | + return $this->callback; |
|
215 | + } |
|
216 | + |
|
217 | + /** |
|
218 | + * @param string $callback |
|
219 | + * |
|
220 | + * @return $this |
|
221 | + */ |
|
222 | + public function setCallback($callback) |
|
223 | + { |
|
224 | + $this->callback = new Expr(strval($callback)); |
|
225 | + |
|
226 | + return $this; |
|
227 | + } |
|
228 | + |
|
229 | + /** |
|
230 | + * @return bool |
|
231 | + */ |
|
232 | + public function isDisplay() |
|
233 | + { |
|
234 | + return $this->display; |
|
235 | + } |
|
236 | + |
|
237 | + /** |
|
238 | + * @param bool $display |
|
239 | + * |
|
240 | + * @return $this |
|
241 | + */ |
|
242 | + public function setDisplay($display) |
|
243 | + { |
|
244 | + $this->display = boolval($display); |
|
245 | + |
|
246 | + return $this; |
|
247 | + } |
|
248 | + |
|
249 | + /** |
|
250 | + * @return string |
|
251 | + */ |
|
252 | + public function getFontColor() |
|
253 | + { |
|
254 | + return $this->fontColor; |
|
255 | + } |
|
256 | + |
|
257 | + /** |
|
258 | + * @param string $fontColor |
|
259 | + * |
|
260 | + * @return $this |
|
261 | + */ |
|
262 | + public function setFontColor($fontColor) |
|
263 | + { |
|
264 | + $this->fontColor = strval($fontColor); |
|
265 | + |
|
266 | + return $this; |
|
267 | + } |
|
268 | + |
|
269 | + /** |
|
270 | + * @return string |
|
271 | + */ |
|
272 | + public function getFontFamily() |
|
273 | + { |
|
274 | + return $this->fontFamily; |
|
275 | + } |
|
276 | + |
|
277 | + /** |
|
278 | + * @param string $fontFamily |
|
279 | + * |
|
280 | + * @return $this |
|
281 | + */ |
|
282 | + public function setFontFamily($fontFamily) |
|
283 | + { |
|
284 | + $this->fontFamily = strval($fontFamily); |
|
285 | + |
|
286 | + return $this; |
|
287 | + } |
|
288 | + |
|
289 | + /** |
|
290 | + * @return int |
|
291 | + */ |
|
292 | + public function getFontSize() |
|
293 | + { |
|
294 | + return $this->fontSize; |
|
295 | + } |
|
296 | + |
|
297 | + /** |
|
298 | + * @param int $fontSize |
|
299 | + * |
|
300 | + * @return $this |
|
301 | + */ |
|
302 | + public function setFontSize($fontSize) |
|
303 | + { |
|
304 | + $this->fontSize = intval($fontSize); |
|
305 | + |
|
306 | + return $this; |
|
307 | + } |
|
308 | + |
|
309 | + /** |
|
310 | + * @return string |
|
311 | + */ |
|
312 | + public function getFontStyle() |
|
313 | + { |
|
314 | + return $this->fontStyle; |
|
315 | + } |
|
316 | + |
|
317 | + /** |
|
318 | + * @param string $fontStyle |
|
319 | + * |
|
320 | + * @return $this |
|
321 | + */ |
|
322 | + public function setFontStyle($fontStyle) |
|
323 | + { |
|
324 | + $this->fontStyle = strval($fontStyle); |
|
325 | + |
|
326 | + return $this; |
|
327 | + } |
|
328 | + |
|
329 | + /** |
|
330 | + * @return int |
|
331 | + */ |
|
332 | + public function getLabelOffset() |
|
333 | + { |
|
334 | + return $this->labelOffset; |
|
335 | + } |
|
336 | + |
|
337 | + /** |
|
338 | + * @param int $labelOffset |
|
339 | + * |
|
340 | + * @return $this |
|
341 | + */ |
|
342 | + public function setLabelOffset($labelOffset) |
|
343 | + { |
|
344 | + $this->labelOffset = intval($labelOffset); |
|
345 | + |
|
346 | + return $this; |
|
347 | + } |
|
348 | + |
|
349 | + /** |
|
350 | + * @return int |
|
351 | + */ |
|
352 | + public function getMaxRotation() |
|
353 | + { |
|
354 | + return $this->maxRotation; |
|
355 | + } |
|
356 | + |
|
357 | + /** |
|
358 | + * @param int $maxRotation |
|
359 | + * |
|
360 | + * @return $this |
|
361 | + */ |
|
362 | + public function setMaxRotation($maxRotation) |
|
363 | + { |
|
364 | + $this->maxRotation = intval($maxRotation); |
|
365 | + |
|
366 | + return $this; |
|
367 | + } |
|
368 | + |
|
369 | + /** |
|
370 | + * @return int |
|
371 | + */ |
|
372 | + public function getMinRotation() |
|
373 | + { |
|
374 | + return $this->minRotation; |
|
375 | + } |
|
376 | + |
|
377 | + /** |
|
378 | + * @param int $minRotation |
|
379 | + * |
|
380 | + * @return $this |
|
381 | + */ |
|
382 | + public function setMinRotation($minRotation) |
|
383 | + { |
|
384 | + $this->minRotation = intval($minRotation); |
|
385 | + |
|
386 | + return $this; |
|
387 | + } |
|
388 | + |
|
389 | + /** |
|
390 | + * @return bool |
|
391 | + */ |
|
392 | + public function isMirror() |
|
393 | + { |
|
394 | + return $this->mirror; |
|
395 | + } |
|
396 | + |
|
397 | + /** |
|
398 | + * @param bool $mirror |
|
399 | + * |
|
400 | + * @return $this |
|
401 | + */ |
|
402 | + public function setMirror($mirror) |
|
403 | + { |
|
404 | + $this->mirror = boolval($mirror); |
|
405 | + |
|
406 | + return $this; |
|
407 | + } |
|
408 | + |
|
409 | + /** |
|
410 | + * @return int |
|
411 | + */ |
|
412 | + public function getPadding() |
|
413 | + { |
|
414 | + return $this->padding; |
|
415 | + } |
|
416 | + |
|
417 | + /** |
|
418 | + * @param int $padding |
|
419 | + * |
|
420 | + * @return $this |
|
421 | + */ |
|
422 | + public function setPadding($padding) |
|
423 | + { |
|
424 | + $this->padding = intval($padding); |
|
425 | + |
|
426 | + return $this; |
|
427 | + } |
|
428 | + |
|
429 | + /** |
|
430 | + * @return bool |
|
431 | + */ |
|
432 | + public function isReverse() |
|
433 | + { |
|
434 | + return $this->reverse; |
|
435 | + } |
|
436 | + |
|
437 | + /** |
|
438 | + * @param bool $reverse |
|
439 | + * |
|
440 | + * @return $this |
|
441 | + */ |
|
442 | + public function setReverse($reverse) |
|
443 | + { |
|
444 | + $this->reverse = boolval($reverse); |
|
445 | + |
|
446 | + return $this; |
|
447 | + } |
|
448 | + |
|
449 | + /** |
|
450 | + * @return int |
|
451 | + */ |
|
452 | + public function getMax() |
|
453 | + { |
|
454 | + return $this->max; |
|
455 | + } |
|
456 | + |
|
457 | + /** |
|
458 | + * @param int $max |
|
459 | + * |
|
460 | + * @return $this |
|
461 | + */ |
|
462 | + public function setMax($max) |
|
463 | + { |
|
464 | + $this->max = intval($max); |
|
465 | + |
|
466 | + return $this; |
|
467 | + } |
|
468 | + |
|
469 | + /** |
|
470 | + * @return array |
|
471 | + */ |
|
472 | + public function jsonSerialize() |
|
473 | + { |
|
474 | + return $this->getArrayCopy(); |
|
475 | + } |
|
476 | 476 | } |
@@ -11,61 +11,61 @@ |
||
11 | 11 | */ |
12 | 12 | class XAxis extends Scale |
13 | 13 | { |
14 | - /** |
|
15 | - * @var float |
|
16 | - */ |
|
17 | - private $categoryPercentage; |
|
14 | + /** |
|
15 | + * @var float |
|
16 | + */ |
|
17 | + private $categoryPercentage; |
|
18 | 18 | |
19 | - /** |
|
20 | - * @var float |
|
21 | - */ |
|
22 | - private $barPercentage; |
|
19 | + /** |
|
20 | + * @var float |
|
21 | + */ |
|
22 | + private $barPercentage; |
|
23 | 23 | |
24 | - /** |
|
25 | - * @return float |
|
26 | - */ |
|
27 | - public function getCategoryPercentage() |
|
28 | - { |
|
29 | - return $this->categoryPercentage; |
|
30 | - } |
|
24 | + /** |
|
25 | + * @return float |
|
26 | + */ |
|
27 | + public function getCategoryPercentage() |
|
28 | + { |
|
29 | + return $this->categoryPercentage; |
|
30 | + } |
|
31 | 31 | |
32 | - /** |
|
33 | - * @param float $categoryPercentage |
|
34 | - * |
|
35 | - * @return $this |
|
36 | - */ |
|
37 | - public function setCategoryPercentage($categoryPercentage) |
|
38 | - { |
|
39 | - $this->categoryPercentage = floatval($categoryPercentage); |
|
32 | + /** |
|
33 | + * @param float $categoryPercentage |
|
34 | + * |
|
35 | + * @return $this |
|
36 | + */ |
|
37 | + public function setCategoryPercentage($categoryPercentage) |
|
38 | + { |
|
39 | + $this->categoryPercentage = floatval($categoryPercentage); |
|
40 | 40 | |
41 | - return $this; |
|
42 | - } |
|
41 | + return $this; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return float |
|
46 | - */ |
|
47 | - public function getBarPercentage() |
|
48 | - { |
|
49 | - return $this->barPercentage; |
|
50 | - } |
|
44 | + /** |
|
45 | + * @return float |
|
46 | + */ |
|
47 | + public function getBarPercentage() |
|
48 | + { |
|
49 | + return $this->barPercentage; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @param float $barPercentage |
|
54 | - * |
|
55 | - * @return $this |
|
56 | - */ |
|
57 | - public function setBarPercentage($barPercentage) |
|
58 | - { |
|
59 | - $this->barPercentage = floatval($barPercentage); |
|
52 | + /** |
|
53 | + * @param float $barPercentage |
|
54 | + * |
|
55 | + * @return $this |
|
56 | + */ |
|
57 | + public function setBarPercentage($barPercentage) |
|
58 | + { |
|
59 | + $this->barPercentage = floatval($barPercentage); |
|
60 | 60 | |
61 | - return $this; |
|
62 | - } |
|
61 | + return $this; |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * @return array |
|
66 | - */ |
|
67 | - public function jsonSerialize() |
|
68 | - { |
|
69 | - return $this->getArrayCopy(); |
|
70 | - } |
|
64 | + /** |
|
65 | + * @return array |
|
66 | + */ |
|
67 | + public function jsonSerialize() |
|
68 | + { |
|
69 | + return $this->getArrayCopy(); |
|
70 | + } |
|
71 | 71 | } |
@@ -13,163 +13,163 @@ |
||
13 | 13 | */ |
14 | 14 | class ScaleLabel implements ArraySerializableInterface, JsonSerializable |
15 | 15 | { |
16 | - use ArraySerializable; |
|
17 | - |
|
18 | - /** |
|
19 | - * @var bool |
|
20 | - */ |
|
21 | - private $display; |
|
22 | - |
|
23 | - /** |
|
24 | - * @var string |
|
25 | - */ |
|
26 | - private $labelString; |
|
27 | - |
|
28 | - /** |
|
29 | - * @var string |
|
30 | - */ |
|
31 | - private $fontColor; |
|
32 | - |
|
33 | - /** |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - private $fontFamily; |
|
37 | - |
|
38 | - /** |
|
39 | - * @var int |
|
40 | - */ |
|
41 | - private $fontSize; |
|
42 | - |
|
43 | - /** |
|
44 | - * @var string |
|
45 | - */ |
|
46 | - private $fontStyle; |
|
47 | - |
|
48 | - /** |
|
49 | - * @return bool |
|
50 | - */ |
|
51 | - public function isDisplay() |
|
52 | - { |
|
53 | - return $this->display; |
|
54 | - } |
|
55 | - |
|
56 | - /** |
|
57 | - * @param bool $display |
|
58 | - * |
|
59 | - * @return $this |
|
60 | - */ |
|
61 | - public function setDisplay($display) |
|
62 | - { |
|
63 | - $this->display = ! ! $display; |
|
64 | - |
|
65 | - return $this; |
|
66 | - } |
|
67 | - |
|
68 | - /** |
|
69 | - * @return string |
|
70 | - */ |
|
71 | - public function getLabelString() |
|
72 | - { |
|
73 | - return $this->labelString; |
|
74 | - } |
|
75 | - |
|
76 | - /** |
|
77 | - * @param string $labelString |
|
78 | - * |
|
79 | - * @return $this |
|
80 | - */ |
|
81 | - public function setLabelString($labelString) |
|
82 | - { |
|
83 | - $this->labelString = strval($labelString); |
|
84 | - |
|
85 | - return $this; |
|
86 | - } |
|
87 | - |
|
88 | - /** |
|
89 | - * @return string |
|
90 | - */ |
|
91 | - public function getFontColor() |
|
92 | - { |
|
93 | - return $this->fontColor; |
|
94 | - } |
|
95 | - |
|
96 | - /** |
|
97 | - * @param string $fontColor |
|
98 | - * |
|
99 | - * @return $this |
|
100 | - */ |
|
101 | - public function setFontColor($fontColor) |
|
102 | - { |
|
103 | - $this->fontColor = strval($fontColor); |
|
104 | - |
|
105 | - return $this; |
|
106 | - } |
|
107 | - |
|
108 | - /** |
|
109 | - * @return string |
|
110 | - */ |
|
111 | - public function getFontFamily() |
|
112 | - { |
|
113 | - return $this->fontFamily; |
|
114 | - } |
|
115 | - |
|
116 | - /** |
|
117 | - * @param string $fontFamily |
|
118 | - * |
|
119 | - * @return $this |
|
120 | - */ |
|
121 | - public function setFontFamily($fontFamily) |
|
122 | - { |
|
123 | - $this->fontFamily = strval($fontFamily); |
|
124 | - |
|
125 | - return $this; |
|
126 | - } |
|
127 | - |
|
128 | - /** |
|
129 | - * @return int |
|
130 | - */ |
|
131 | - public function getFontSize() |
|
132 | - { |
|
133 | - return $this->fontSize; |
|
134 | - } |
|
135 | - |
|
136 | - /** |
|
137 | - * @param int $fontSize |
|
138 | - * |
|
139 | - * @return $this |
|
140 | - */ |
|
141 | - public function setFontSize($fontSize) |
|
142 | - { |
|
143 | - $this->fontSize = intval($fontSize); |
|
144 | - |
|
145 | - return $this; |
|
146 | - } |
|
147 | - |
|
148 | - /** |
|
149 | - * @return string |
|
150 | - */ |
|
151 | - public function getFontStyle() |
|
152 | - { |
|
153 | - return $this->fontStyle; |
|
154 | - } |
|
155 | - |
|
156 | - /** |
|
157 | - * @param string $fontStyle |
|
158 | - * |
|
159 | - * @return $this |
|
160 | - */ |
|
161 | - public function setFontStyle($fontStyle) |
|
162 | - { |
|
163 | - $this->fontStyle = strval($fontStyle); |
|
164 | - |
|
165 | - return $this; |
|
166 | - } |
|
167 | - |
|
168 | - /** |
|
169 | - * @return array |
|
170 | - */ |
|
171 | - public function jsonSerialize() |
|
172 | - { |
|
173 | - return $this->getArrayCopy(); |
|
174 | - } |
|
16 | + use ArraySerializable; |
|
17 | + |
|
18 | + /** |
|
19 | + * @var bool |
|
20 | + */ |
|
21 | + private $display; |
|
22 | + |
|
23 | + /** |
|
24 | + * @var string |
|
25 | + */ |
|
26 | + private $labelString; |
|
27 | + |
|
28 | + /** |
|
29 | + * @var string |
|
30 | + */ |
|
31 | + private $fontColor; |
|
32 | + |
|
33 | + /** |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + private $fontFamily; |
|
37 | + |
|
38 | + /** |
|
39 | + * @var int |
|
40 | + */ |
|
41 | + private $fontSize; |
|
42 | + |
|
43 | + /** |
|
44 | + * @var string |
|
45 | + */ |
|
46 | + private $fontStyle; |
|
47 | + |
|
48 | + /** |
|
49 | + * @return bool |
|
50 | + */ |
|
51 | + public function isDisplay() |
|
52 | + { |
|
53 | + return $this->display; |
|
54 | + } |
|
55 | + |
|
56 | + /** |
|
57 | + * @param bool $display |
|
58 | + * |
|
59 | + * @return $this |
|
60 | + */ |
|
61 | + public function setDisplay($display) |
|
62 | + { |
|
63 | + $this->display = ! ! $display; |
|
64 | + |
|
65 | + return $this; |
|
66 | + } |
|
67 | + |
|
68 | + /** |
|
69 | + * @return string |
|
70 | + */ |
|
71 | + public function getLabelString() |
|
72 | + { |
|
73 | + return $this->labelString; |
|
74 | + } |
|
75 | + |
|
76 | + /** |
|
77 | + * @param string $labelString |
|
78 | + * |
|
79 | + * @return $this |
|
80 | + */ |
|
81 | + public function setLabelString($labelString) |
|
82 | + { |
|
83 | + $this->labelString = strval($labelString); |
|
84 | + |
|
85 | + return $this; |
|
86 | + } |
|
87 | + |
|
88 | + /** |
|
89 | + * @return string |
|
90 | + */ |
|
91 | + public function getFontColor() |
|
92 | + { |
|
93 | + return $this->fontColor; |
|
94 | + } |
|
95 | + |
|
96 | + /** |
|
97 | + * @param string $fontColor |
|
98 | + * |
|
99 | + * @return $this |
|
100 | + */ |
|
101 | + public function setFontColor($fontColor) |
|
102 | + { |
|
103 | + $this->fontColor = strval($fontColor); |
|
104 | + |
|
105 | + return $this; |
|
106 | + } |
|
107 | + |
|
108 | + /** |
|
109 | + * @return string |
|
110 | + */ |
|
111 | + public function getFontFamily() |
|
112 | + { |
|
113 | + return $this->fontFamily; |
|
114 | + } |
|
115 | + |
|
116 | + /** |
|
117 | + * @param string $fontFamily |
|
118 | + * |
|
119 | + * @return $this |
|
120 | + */ |
|
121 | + public function setFontFamily($fontFamily) |
|
122 | + { |
|
123 | + $this->fontFamily = strval($fontFamily); |
|
124 | + |
|
125 | + return $this; |
|
126 | + } |
|
127 | + |
|
128 | + /** |
|
129 | + * @return int |
|
130 | + */ |
|
131 | + public function getFontSize() |
|
132 | + { |
|
133 | + return $this->fontSize; |
|
134 | + } |
|
135 | + |
|
136 | + /** |
|
137 | + * @param int $fontSize |
|
138 | + * |
|
139 | + * @return $this |
|
140 | + */ |
|
141 | + public function setFontSize($fontSize) |
|
142 | + { |
|
143 | + $this->fontSize = intval($fontSize); |
|
144 | + |
|
145 | + return $this; |
|
146 | + } |
|
147 | + |
|
148 | + /** |
|
149 | + * @return string |
|
150 | + */ |
|
151 | + public function getFontStyle() |
|
152 | + { |
|
153 | + return $this->fontStyle; |
|
154 | + } |
|
155 | + |
|
156 | + /** |
|
157 | + * @param string $fontStyle |
|
158 | + * |
|
159 | + * @return $this |
|
160 | + */ |
|
161 | + public function setFontStyle($fontStyle) |
|
162 | + { |
|
163 | + $this->fontStyle = strval($fontStyle); |
|
164 | + |
|
165 | + return $this; |
|
166 | + } |
|
167 | + |
|
168 | + /** |
|
169 | + * @return array |
|
170 | + */ |
|
171 | + public function jsonSerialize() |
|
172 | + { |
|
173 | + return $this->getArrayCopy(); |
|
174 | + } |
|
175 | 175 | } |
@@ -13,25 +13,25 @@ |
||
13 | 13 | */ |
14 | 14 | class YAxisCollection extends ArrayAccess implements ArraySerializableInterface, JsonSerializable |
15 | 15 | { |
16 | - /** |
|
17 | - * @return array |
|
18 | - */ |
|
19 | - public function getArrayCopy() |
|
20 | - { |
|
21 | - $rows = []; |
|
22 | - foreach ($this->data as $row) { |
|
23 | - /** @var YAxis $row */ |
|
24 | - $rows[] = $row->getArrayCopy(); |
|
25 | - } |
|
16 | + /** |
|
17 | + * @return array |
|
18 | + */ |
|
19 | + public function getArrayCopy() |
|
20 | + { |
|
21 | + $rows = []; |
|
22 | + foreach ($this->data as $row) { |
|
23 | + /** @var YAxis $row */ |
|
24 | + $rows[] = $row->getArrayCopy(); |
|
25 | + } |
|
26 | 26 | |
27 | - return $rows; |
|
28 | - } |
|
27 | + return $rows; |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * @return array |
|
32 | - */ |
|
33 | - public function jsonSerialize() |
|
34 | - { |
|
35 | - return $this->getArrayCopy(); |
|
36 | - } |
|
30 | + /** |
|
31 | + * @return array |
|
32 | + */ |
|
33 | + public function jsonSerialize() |
|
34 | + { |
|
35 | + return $this->getArrayCopy(); |
|
36 | + } |
|
37 | 37 | } |
@@ -13,25 +13,25 @@ |
||
13 | 13 | */ |
14 | 14 | class XAxisCollection extends ArrayAccess implements ArraySerializableInterface, JsonSerializable |
15 | 15 | { |
16 | - /** |
|
17 | - * @return array |
|
18 | - */ |
|
19 | - public function getArrayCopy() |
|
20 | - { |
|
21 | - $rows = []; |
|
22 | - foreach ($this->data as $row) { |
|
23 | - /** @var XAxis $row */ |
|
24 | - $rows[] = $row->getArrayCopy(); |
|
25 | - } |
|
16 | + /** |
|
17 | + * @return array |
|
18 | + */ |
|
19 | + public function getArrayCopy() |
|
20 | + { |
|
21 | + $rows = []; |
|
22 | + foreach ($this->data as $row) { |
|
23 | + /** @var XAxis $row */ |
|
24 | + $rows[] = $row->getArrayCopy(); |
|
25 | + } |
|
26 | 26 | |
27 | - return $rows; |
|
28 | - } |
|
27 | + return $rows; |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * @return array |
|
32 | - */ |
|
33 | - public function jsonSerialize() |
|
34 | - { |
|
35 | - return $this->getArrayCopy(); |
|
36 | - } |
|
30 | + /** |
|
31 | + * @return array |
|
32 | + */ |
|
33 | + public function jsonSerialize() |
|
34 | + { |
|
35 | + return $this->getArrayCopy(); |
|
36 | + } |
|
37 | 37 | } |
@@ -14,213 +14,213 @@ |
||
14 | 14 | */ |
15 | 15 | class Labels implements ArraySerializableInterface, JsonSerializable |
16 | 16 | { |
17 | - use ArraySerializable; |
|
18 | - |
|
19 | - /** |
|
20 | - * @var int |
|
21 | - */ |
|
22 | - private $boxWidth; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var int |
|
26 | - */ |
|
27 | - private $fontSize; |
|
28 | - |
|
29 | - /** |
|
30 | - * @var string |
|
31 | - */ |
|
32 | - private $fontStyle; |
|
33 | - |
|
34 | - /** |
|
35 | - * @var string |
|
36 | - */ |
|
37 | - private $fontColor; |
|
38 | - |
|
39 | - /** |
|
40 | - * @var string |
|
41 | - */ |
|
42 | - private $fontFamily; |
|
43 | - |
|
44 | - /** |
|
45 | - * @var int |
|
46 | - */ |
|
47 | - private $padding; |
|
48 | - |
|
49 | - /** |
|
50 | - * @var Expr |
|
51 | - */ |
|
52 | - private $generateLabels; |
|
53 | - |
|
54 | - /** |
|
55 | - * @var bool |
|
56 | - */ |
|
57 | - private $usePointStyle; |
|
58 | - |
|
59 | - /** |
|
60 | - * @return int |
|
61 | - */ |
|
62 | - public function getBoxWidth() |
|
63 | - { |
|
64 | - return $this->boxWidth; |
|
65 | - } |
|
66 | - |
|
67 | - /** |
|
68 | - * @param int $boxWidth |
|
69 | - * |
|
70 | - * @return Labels |
|
71 | - */ |
|
72 | - public function setBoxWidth($boxWidth) |
|
73 | - { |
|
74 | - $this->boxWidth = intval($boxWidth); |
|
75 | - |
|
76 | - return $this; |
|
77 | - } |
|
78 | - |
|
79 | - /** |
|
80 | - * @return mixed |
|
81 | - */ |
|
82 | - public function getFontSize() |
|
83 | - { |
|
84 | - return $this->fontSize; |
|
85 | - } |
|
86 | - |
|
87 | - /** |
|
88 | - * @param int $fontSize |
|
89 | - * |
|
90 | - * @return Labels |
|
91 | - */ |
|
92 | - public function setFontSize($fontSize) |
|
93 | - { |
|
94 | - $this->fontSize = intval($fontSize); |
|
95 | - |
|
96 | - return $this; |
|
97 | - } |
|
98 | - |
|
99 | - /** |
|
100 | - * @return string |
|
101 | - */ |
|
102 | - public function getFontStyle() |
|
103 | - { |
|
104 | - return $this->fontStyle; |
|
105 | - } |
|
106 | - |
|
107 | - /** |
|
108 | - * @param string $fontStyle |
|
109 | - * |
|
110 | - * @return Labels |
|
111 | - */ |
|
112 | - public function setFontStyle($fontStyle) |
|
113 | - { |
|
114 | - $this->fontStyle = strval($fontStyle); |
|
115 | - |
|
116 | - return $this; |
|
117 | - } |
|
118 | - |
|
119 | - /** |
|
120 | - * @return string |
|
121 | - */ |
|
122 | - public function getFontColor() |
|
123 | - { |
|
124 | - return $this->fontColor; |
|
125 | - } |
|
126 | - |
|
127 | - /** |
|
128 | - * @param string $fontColor |
|
129 | - * |
|
130 | - * @return Labels |
|
131 | - */ |
|
132 | - public function setFontColor($fontColor) |
|
133 | - { |
|
134 | - $this->fontColor = strval($fontColor); |
|
135 | - |
|
136 | - return $this; |
|
137 | - } |
|
138 | - |
|
139 | - /** |
|
140 | - * @return string |
|
141 | - */ |
|
142 | - public function getFontFamily() |
|
143 | - { |
|
144 | - return $this->fontFamily; |
|
145 | - } |
|
146 | - |
|
147 | - /** |
|
148 | - * @param string $fontFamily |
|
149 | - * |
|
150 | - * @return Labels |
|
151 | - */ |
|
152 | - public function setFontFamily($fontFamily) |
|
153 | - { |
|
154 | - $this->fontFamily = strval($fontFamily); |
|
155 | - |
|
156 | - return $this; |
|
157 | - } |
|
158 | - |
|
159 | - /** |
|
160 | - * @return int |
|
161 | - */ |
|
162 | - public function getPadding() |
|
163 | - { |
|
164 | - return $this->padding; |
|
165 | - } |
|
166 | - |
|
167 | - /** |
|
168 | - * @param int $padding |
|
169 | - * |
|
170 | - * @return Labels |
|
171 | - */ |
|
172 | - public function setPadding($padding) |
|
173 | - { |
|
174 | - $this->padding = intval($padding); |
|
175 | - |
|
176 | - return $this; |
|
177 | - } |
|
178 | - |
|
179 | - /** |
|
180 | - * @return Expr |
|
181 | - */ |
|
182 | - public function getGenerateLabels() |
|
183 | - { |
|
184 | - return $this->generateLabels; |
|
185 | - } |
|
186 | - |
|
187 | - /** |
|
188 | - * @param string $generateLabels |
|
189 | - * |
|
190 | - * @return Labels |
|
191 | - */ |
|
192 | - public function setGenerateLabels($generateLabels) |
|
193 | - { |
|
194 | - $this->generateLabels = new Expr(strval($generateLabels)); |
|
195 | - |
|
196 | - return $this; |
|
197 | - } |
|
198 | - |
|
199 | - /** |
|
200 | - * @return bool |
|
201 | - */ |
|
202 | - public function isUsePointStyle() |
|
203 | - { |
|
204 | - return $this->usePointStyle; |
|
205 | - } |
|
206 | - |
|
207 | - /** |
|
208 | - * @param bool $usePointStyle |
|
209 | - * |
|
210 | - * @return Labels |
|
211 | - */ |
|
212 | - public function setUsePointStyle($usePointStyle) |
|
213 | - { |
|
214 | - $this->usePointStyle = ! ! $usePointStyle; |
|
215 | - |
|
216 | - return $this; |
|
217 | - } |
|
218 | - |
|
219 | - /** |
|
220 | - * @return array |
|
221 | - */ |
|
222 | - public function jsonSerialize() |
|
223 | - { |
|
224 | - return $this->getArrayCopy(); |
|
225 | - } |
|
17 | + use ArraySerializable; |
|
18 | + |
|
19 | + /** |
|
20 | + * @var int |
|
21 | + */ |
|
22 | + private $boxWidth; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var int |
|
26 | + */ |
|
27 | + private $fontSize; |
|
28 | + |
|
29 | + /** |
|
30 | + * @var string |
|
31 | + */ |
|
32 | + private $fontStyle; |
|
33 | + |
|
34 | + /** |
|
35 | + * @var string |
|
36 | + */ |
|
37 | + private $fontColor; |
|
38 | + |
|
39 | + /** |
|
40 | + * @var string |
|
41 | + */ |
|
42 | + private $fontFamily; |
|
43 | + |
|
44 | + /** |
|
45 | + * @var int |
|
46 | + */ |
|
47 | + private $padding; |
|
48 | + |
|
49 | + /** |
|
50 | + * @var Expr |
|
51 | + */ |
|
52 | + private $generateLabels; |
|
53 | + |
|
54 | + /** |
|
55 | + * @var bool |
|
56 | + */ |
|
57 | + private $usePointStyle; |
|
58 | + |
|
59 | + /** |
|
60 | + * @return int |
|
61 | + */ |
|
62 | + public function getBoxWidth() |
|
63 | + { |
|
64 | + return $this->boxWidth; |
|
65 | + } |
|
66 | + |
|
67 | + /** |
|
68 | + * @param int $boxWidth |
|
69 | + * |
|
70 | + * @return Labels |
|
71 | + */ |
|
72 | + public function setBoxWidth($boxWidth) |
|
73 | + { |
|
74 | + $this->boxWidth = intval($boxWidth); |
|
75 | + |
|
76 | + return $this; |
|
77 | + } |
|
78 | + |
|
79 | + /** |
|
80 | + * @return mixed |
|
81 | + */ |
|
82 | + public function getFontSize() |
|
83 | + { |
|
84 | + return $this->fontSize; |
|
85 | + } |
|
86 | + |
|
87 | + /** |
|
88 | + * @param int $fontSize |
|
89 | + * |
|
90 | + * @return Labels |
|
91 | + */ |
|
92 | + public function setFontSize($fontSize) |
|
93 | + { |
|
94 | + $this->fontSize = intval($fontSize); |
|
95 | + |
|
96 | + return $this; |
|
97 | + } |
|
98 | + |
|
99 | + /** |
|
100 | + * @return string |
|
101 | + */ |
|
102 | + public function getFontStyle() |
|
103 | + { |
|
104 | + return $this->fontStyle; |
|
105 | + } |
|
106 | + |
|
107 | + /** |
|
108 | + * @param string $fontStyle |
|
109 | + * |
|
110 | + * @return Labels |
|
111 | + */ |
|
112 | + public function setFontStyle($fontStyle) |
|
113 | + { |
|
114 | + $this->fontStyle = strval($fontStyle); |
|
115 | + |
|
116 | + return $this; |
|
117 | + } |
|
118 | + |
|
119 | + /** |
|
120 | + * @return string |
|
121 | + */ |
|
122 | + public function getFontColor() |
|
123 | + { |
|
124 | + return $this->fontColor; |
|
125 | + } |
|
126 | + |
|
127 | + /** |
|
128 | + * @param string $fontColor |
|
129 | + * |
|
130 | + * @return Labels |
|
131 | + */ |
|
132 | + public function setFontColor($fontColor) |
|
133 | + { |
|
134 | + $this->fontColor = strval($fontColor); |
|
135 | + |
|
136 | + return $this; |
|
137 | + } |
|
138 | + |
|
139 | + /** |
|
140 | + * @return string |
|
141 | + */ |
|
142 | + public function getFontFamily() |
|
143 | + { |
|
144 | + return $this->fontFamily; |
|
145 | + } |
|
146 | + |
|
147 | + /** |
|
148 | + * @param string $fontFamily |
|
149 | + * |
|
150 | + * @return Labels |
|
151 | + */ |
|
152 | + public function setFontFamily($fontFamily) |
|
153 | + { |
|
154 | + $this->fontFamily = strval($fontFamily); |
|
155 | + |
|
156 | + return $this; |
|
157 | + } |
|
158 | + |
|
159 | + /** |
|
160 | + * @return int |
|
161 | + */ |
|
162 | + public function getPadding() |
|
163 | + { |
|
164 | + return $this->padding; |
|
165 | + } |
|
166 | + |
|
167 | + /** |
|
168 | + * @param int $padding |
|
169 | + * |
|
170 | + * @return Labels |
|
171 | + */ |
|
172 | + public function setPadding($padding) |
|
173 | + { |
|
174 | + $this->padding = intval($padding); |
|
175 | + |
|
176 | + return $this; |
|
177 | + } |
|
178 | + |
|
179 | + /** |
|
180 | + * @return Expr |
|
181 | + */ |
|
182 | + public function getGenerateLabels() |
|
183 | + { |
|
184 | + return $this->generateLabels; |
|
185 | + } |
|
186 | + |
|
187 | + /** |
|
188 | + * @param string $generateLabels |
|
189 | + * |
|
190 | + * @return Labels |
|
191 | + */ |
|
192 | + public function setGenerateLabels($generateLabels) |
|
193 | + { |
|
194 | + $this->generateLabels = new Expr(strval($generateLabels)); |
|
195 | + |
|
196 | + return $this; |
|
197 | + } |
|
198 | + |
|
199 | + /** |
|
200 | + * @return bool |
|
201 | + */ |
|
202 | + public function isUsePointStyle() |
|
203 | + { |
|
204 | + return $this->usePointStyle; |
|
205 | + } |
|
206 | + |
|
207 | + /** |
|
208 | + * @param bool $usePointStyle |
|
209 | + * |
|
210 | + * @return Labels |
|
211 | + */ |
|
212 | + public function setUsePointStyle($usePointStyle) |
|
213 | + { |
|
214 | + $this->usePointStyle = ! ! $usePointStyle; |
|
215 | + |
|
216 | + return $this; |
|
217 | + } |
|
218 | + |
|
219 | + /** |
|
220 | + * @return array |
|
221 | + */ |
|
222 | + public function jsonSerialize() |
|
223 | + { |
|
224 | + return $this->getArrayCopy(); |
|
225 | + } |
|
226 | 226 | } |
@@ -13,238 +13,238 @@ |
||
13 | 13 | */ |
14 | 14 | class Title implements ArraySerializableInterface, JsonSerializable |
15 | 15 | { |
16 | - use ArraySerializable; |
|
17 | - |
|
18 | - /** |
|
19 | - * @var bool |
|
20 | - */ |
|
21 | - private $display; |
|
22 | - |
|
23 | - /** |
|
24 | - * @var string |
|
25 | - */ |
|
26 | - private $position; |
|
27 | - |
|
28 | - /** |
|
29 | - * @var bool |
|
30 | - */ |
|
31 | - private $fullWidth; |
|
32 | - |
|
33 | - /** |
|
34 | - * @var int |
|
35 | - */ |
|
36 | - private $fontSize; |
|
37 | - |
|
38 | - /** |
|
39 | - * @var string |
|
40 | - */ |
|
41 | - private $fontFamily; |
|
42 | - |
|
43 | - /** |
|
44 | - * @var string |
|
45 | - */ |
|
46 | - private $fontColor; |
|
47 | - |
|
48 | - /** |
|
49 | - * @var string |
|
50 | - */ |
|
51 | - private $fontStyle; |
|
52 | - |
|
53 | - /** |
|
54 | - * @var int |
|
55 | - */ |
|
56 | - private $padding; |
|
57 | - |
|
58 | - /** |
|
59 | - * @var string |
|
60 | - */ |
|
61 | - private $text; |
|
62 | - |
|
63 | - /** |
|
64 | - * @return bool |
|
65 | - */ |
|
66 | - public function isDisplay() |
|
67 | - { |
|
68 | - return $this->display; |
|
69 | - } |
|
70 | - |
|
71 | - /** |
|
72 | - * @param bool $display |
|
73 | - * |
|
74 | - * @return $this |
|
75 | - */ |
|
76 | - public function setDisplay($display) |
|
77 | - { |
|
78 | - $this->display = boolval($display); |
|
79 | - |
|
80 | - return $this; |
|
81 | - } |
|
82 | - |
|
83 | - /** |
|
84 | - * @return string |
|
85 | - */ |
|
86 | - public function getPosition() |
|
87 | - { |
|
88 | - return $this->position; |
|
89 | - } |
|
90 | - |
|
91 | - /** |
|
92 | - * @param string $position |
|
93 | - * |
|
94 | - * @return $this |
|
95 | - */ |
|
96 | - public function setPosition($position) |
|
97 | - { |
|
98 | - $this->position = strval($position); |
|
99 | - |
|
100 | - return $this; |
|
101 | - } |
|
102 | - |
|
103 | - /** |
|
104 | - * @return bool |
|
105 | - */ |
|
106 | - public function isFullWidth() |
|
107 | - { |
|
108 | - return $this->fullWidth; |
|
109 | - } |
|
110 | - |
|
111 | - /** |
|
112 | - * @param bool $fullWidth |
|
113 | - * |
|
114 | - * @return $this |
|
115 | - */ |
|
116 | - public function setFullWidth($fullWidth) |
|
117 | - { |
|
118 | - $this->fullWidth = boolval($fullWidth); |
|
119 | - |
|
120 | - return $this; |
|
121 | - } |
|
122 | - |
|
123 | - /** |
|
124 | - * @return int |
|
125 | - */ |
|
126 | - public function getFontSize() |
|
127 | - { |
|
128 | - return $this->fontSize; |
|
129 | - } |
|
130 | - |
|
131 | - /** |
|
132 | - * @param int $fontSize |
|
133 | - * |
|
134 | - * @return $this |
|
135 | - */ |
|
136 | - public function setFontSize($fontSize) |
|
137 | - { |
|
138 | - $this->fontSize = intval($fontSize); |
|
139 | - |
|
140 | - return $this; |
|
141 | - } |
|
142 | - |
|
143 | - /** |
|
144 | - * @return string |
|
145 | - */ |
|
146 | - public function getFontFamily() |
|
147 | - { |
|
148 | - return $this->fontFamily; |
|
149 | - } |
|
150 | - |
|
151 | - /** |
|
152 | - * @param string $fontFamily |
|
153 | - * |
|
154 | - * @return $this |
|
155 | - */ |
|
156 | - public function setFontFamily($fontFamily) |
|
157 | - { |
|
158 | - $this->fontFamily = strval($fontFamily); |
|
159 | - |
|
160 | - return $this; |
|
161 | - } |
|
162 | - |
|
163 | - /** |
|
164 | - * @return string |
|
165 | - */ |
|
166 | - public function getFontColor() |
|
167 | - { |
|
168 | - return $this->fontColor; |
|
169 | - } |
|
170 | - |
|
171 | - /** |
|
172 | - * @param string $fontColor |
|
173 | - * |
|
174 | - * @return $this |
|
175 | - */ |
|
176 | - public function setFontColor($fontColor) |
|
177 | - { |
|
178 | - $this->fontColor = strval($fontColor); |
|
179 | - |
|
180 | - return $this; |
|
181 | - } |
|
182 | - |
|
183 | - /** |
|
184 | - * @return string |
|
185 | - */ |
|
186 | - public function getFontStyle() |
|
187 | - { |
|
188 | - return $this->fontStyle; |
|
189 | - } |
|
190 | - |
|
191 | - /** |
|
192 | - * @param string $fontStyle |
|
193 | - * |
|
194 | - * @return $this |
|
195 | - */ |
|
196 | - public function setFontStyle($fontStyle) |
|
197 | - { |
|
198 | - $this->fontStyle = strval($fontStyle); |
|
199 | - |
|
200 | - return $this; |
|
201 | - } |
|
202 | - |
|
203 | - /** |
|
204 | - * @return int |
|
205 | - */ |
|
206 | - public function getPadding() |
|
207 | - { |
|
208 | - return $this->padding; |
|
209 | - } |
|
210 | - |
|
211 | - /** |
|
212 | - * @param int $padding |
|
213 | - * |
|
214 | - * @return $this |
|
215 | - */ |
|
216 | - public function setPadding($padding) |
|
217 | - { |
|
218 | - $this->padding = intval($padding); |
|
219 | - |
|
220 | - return $this; |
|
221 | - } |
|
222 | - |
|
223 | - /** |
|
224 | - * @return string |
|
225 | - */ |
|
226 | - public function getText() |
|
227 | - { |
|
228 | - return $this->text; |
|
229 | - } |
|
230 | - |
|
231 | - /** |
|
232 | - * @param string $text |
|
233 | - * |
|
234 | - * @return $this |
|
235 | - */ |
|
236 | - public function setText($text) |
|
237 | - { |
|
238 | - $this->text = strval($text); |
|
239 | - |
|
240 | - return $this; |
|
241 | - } |
|
242 | - |
|
243 | - /** |
|
244 | - * @return array |
|
245 | - */ |
|
246 | - public function jsonSerialize() |
|
247 | - { |
|
248 | - return $this->getArrayCopy(); |
|
249 | - } |
|
16 | + use ArraySerializable; |
|
17 | + |
|
18 | + /** |
|
19 | + * @var bool |
|
20 | + */ |
|
21 | + private $display; |
|
22 | + |
|
23 | + /** |
|
24 | + * @var string |
|
25 | + */ |
|
26 | + private $position; |
|
27 | + |
|
28 | + /** |
|
29 | + * @var bool |
|
30 | + */ |
|
31 | + private $fullWidth; |
|
32 | + |
|
33 | + /** |
|
34 | + * @var int |
|
35 | + */ |
|
36 | + private $fontSize; |
|
37 | + |
|
38 | + /** |
|
39 | + * @var string |
|
40 | + */ |
|
41 | + private $fontFamily; |
|
42 | + |
|
43 | + /** |
|
44 | + * @var string |
|
45 | + */ |
|
46 | + private $fontColor; |
|
47 | + |
|
48 | + /** |
|
49 | + * @var string |
|
50 | + */ |
|
51 | + private $fontStyle; |
|
52 | + |
|
53 | + /** |
|
54 | + * @var int |
|
55 | + */ |
|
56 | + private $padding; |
|
57 | + |
|
58 | + /** |
|
59 | + * @var string |
|
60 | + */ |
|
61 | + private $text; |
|
62 | + |
|
63 | + /** |
|
64 | + * @return bool |
|
65 | + */ |
|
66 | + public function isDisplay() |
|
67 | + { |
|
68 | + return $this->display; |
|
69 | + } |
|
70 | + |
|
71 | + /** |
|
72 | + * @param bool $display |
|
73 | + * |
|
74 | + * @return $this |
|
75 | + */ |
|
76 | + public function setDisplay($display) |
|
77 | + { |
|
78 | + $this->display = boolval($display); |
|
79 | + |
|
80 | + return $this; |
|
81 | + } |
|
82 | + |
|
83 | + /** |
|
84 | + * @return string |
|
85 | + */ |
|
86 | + public function getPosition() |
|
87 | + { |
|
88 | + return $this->position; |
|
89 | + } |
|
90 | + |
|
91 | + /** |
|
92 | + * @param string $position |
|
93 | + * |
|
94 | + * @return $this |
|
95 | + */ |
|
96 | + public function setPosition($position) |
|
97 | + { |
|
98 | + $this->position = strval($position); |
|
99 | + |
|
100 | + return $this; |
|
101 | + } |
|
102 | + |
|
103 | + /** |
|
104 | + * @return bool |
|
105 | + */ |
|
106 | + public function isFullWidth() |
|
107 | + { |
|
108 | + return $this->fullWidth; |
|
109 | + } |
|
110 | + |
|
111 | + /** |
|
112 | + * @param bool $fullWidth |
|
113 | + * |
|
114 | + * @return $this |
|
115 | + */ |
|
116 | + public function setFullWidth($fullWidth) |
|
117 | + { |
|
118 | + $this->fullWidth = boolval($fullWidth); |
|
119 | + |
|
120 | + return $this; |
|
121 | + } |
|
122 | + |
|
123 | + /** |
|
124 | + * @return int |
|
125 | + */ |
|
126 | + public function getFontSize() |
|
127 | + { |
|
128 | + return $this->fontSize; |
|
129 | + } |
|
130 | + |
|
131 | + /** |
|
132 | + * @param int $fontSize |
|
133 | + * |
|
134 | + * @return $this |
|
135 | + */ |
|
136 | + public function setFontSize($fontSize) |
|
137 | + { |
|
138 | + $this->fontSize = intval($fontSize); |
|
139 | + |
|
140 | + return $this; |
|
141 | + } |
|
142 | + |
|
143 | + /** |
|
144 | + * @return string |
|
145 | + */ |
|
146 | + public function getFontFamily() |
|
147 | + { |
|
148 | + return $this->fontFamily; |
|
149 | + } |
|
150 | + |
|
151 | + /** |
|
152 | + * @param string $fontFamily |
|
153 | + * |
|
154 | + * @return $this |
|
155 | + */ |
|
156 | + public function setFontFamily($fontFamily) |
|
157 | + { |
|
158 | + $this->fontFamily = strval($fontFamily); |
|
159 | + |
|
160 | + return $this; |
|
161 | + } |
|
162 | + |
|
163 | + /** |
|
164 | + * @return string |
|
165 | + */ |
|
166 | + public function getFontColor() |
|
167 | + { |
|
168 | + return $this->fontColor; |
|
169 | + } |
|
170 | + |
|
171 | + /** |
|
172 | + * @param string $fontColor |
|
173 | + * |
|
174 | + * @return $this |
|
175 | + */ |
|
176 | + public function setFontColor($fontColor) |
|
177 | + { |
|
178 | + $this->fontColor = strval($fontColor); |
|
179 | + |
|
180 | + return $this; |
|
181 | + } |
|
182 | + |
|
183 | + /** |
|
184 | + * @return string |
|
185 | + */ |
|
186 | + public function getFontStyle() |
|
187 | + { |
|
188 | + return $this->fontStyle; |
|
189 | + } |
|
190 | + |
|
191 | + /** |
|
192 | + * @param string $fontStyle |
|
193 | + * |
|
194 | + * @return $this |
|
195 | + */ |
|
196 | + public function setFontStyle($fontStyle) |
|
197 | + { |
|
198 | + $this->fontStyle = strval($fontStyle); |
|
199 | + |
|
200 | + return $this; |
|
201 | + } |
|
202 | + |
|
203 | + /** |
|
204 | + * @return int |
|
205 | + */ |
|
206 | + public function getPadding() |
|
207 | + { |
|
208 | + return $this->padding; |
|
209 | + } |
|
210 | + |
|
211 | + /** |
|
212 | + * @param int $padding |
|
213 | + * |
|
214 | + * @return $this |
|
215 | + */ |
|
216 | + public function setPadding($padding) |
|
217 | + { |
|
218 | + $this->padding = intval($padding); |
|
219 | + |
|
220 | + return $this; |
|
221 | + } |
|
222 | + |
|
223 | + /** |
|
224 | + * @return string |
|
225 | + */ |
|
226 | + public function getText() |
|
227 | + { |
|
228 | + return $this->text; |
|
229 | + } |
|
230 | + |
|
231 | + /** |
|
232 | + * @param string $text |
|
233 | + * |
|
234 | + * @return $this |
|
235 | + */ |
|
236 | + public function setText($text) |
|
237 | + { |
|
238 | + $this->text = strval($text); |
|
239 | + |
|
240 | + return $this; |
|
241 | + } |
|
242 | + |
|
243 | + /** |
|
244 | + * @return array |
|
245 | + */ |
|
246 | + public function jsonSerialize() |
|
247 | + { |
|
248 | + return $this->getArrayCopy(); |
|
249 | + } |
|
250 | 250 | } |
@@ -15,180 +15,180 @@ |
||
15 | 15 | */ |
16 | 16 | class Legend implements ArraySerializableInterface, JsonSerializable |
17 | 17 | { |
18 | - use ArraySerializable; |
|
19 | - |
|
20 | - /** |
|
21 | - * @var bool |
|
22 | - */ |
|
23 | - private $display; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var string |
|
27 | - */ |
|
28 | - private $position; |
|
29 | - |
|
30 | - /** |
|
31 | - * @var bool |
|
32 | - */ |
|
33 | - private $fullWidth; |
|
34 | - |
|
35 | - /** |
|
36 | - * @var Expr |
|
37 | - */ |
|
38 | - private $onClick; |
|
39 | - |
|
40 | - /** |
|
41 | - * @var Expr |
|
42 | - */ |
|
43 | - private $onHover; |
|
44 | - |
|
45 | - /** |
|
46 | - * @var LabelsCollection |
|
47 | - */ |
|
48 | - private $labels; |
|
49 | - |
|
50 | - /** |
|
51 | - * @var bool |
|
52 | - */ |
|
53 | - private $reverse; |
|
54 | - |
|
55 | - /** |
|
56 | - * @return bool |
|
57 | - */ |
|
58 | - public function isDisplay() |
|
59 | - { |
|
60 | - return $this->display; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * @param bool $display |
|
65 | - * |
|
66 | - * @return $this |
|
67 | - */ |
|
68 | - public function setDisplay($display) |
|
69 | - { |
|
70 | - $this->display = boolval($display); |
|
71 | - |
|
72 | - return $this; |
|
73 | - } |
|
74 | - |
|
75 | - /** |
|
76 | - * @return string |
|
77 | - */ |
|
78 | - public function getPosition() |
|
79 | - { |
|
80 | - return $this->position; |
|
81 | - } |
|
82 | - |
|
83 | - /** |
|
84 | - * @param string $position |
|
85 | - * |
|
86 | - * @return $this |
|
87 | - */ |
|
88 | - public function setPosition($position) |
|
89 | - { |
|
90 | - $this->position = strval($position); |
|
91 | - |
|
92 | - return $this; |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * @return bool |
|
97 | - */ |
|
98 | - public function isFullWidth() |
|
99 | - { |
|
100 | - return $this->fullWidth; |
|
101 | - } |
|
102 | - |
|
103 | - /** |
|
104 | - * @param bool $fullWidth |
|
105 | - * |
|
106 | - * @return $this |
|
107 | - */ |
|
108 | - public function setFullWidth($fullWidth) |
|
109 | - { |
|
110 | - $this->fullWidth = boolval($fullWidth); |
|
111 | - |
|
112 | - return $this; |
|
113 | - } |
|
114 | - |
|
115 | - /** |
|
116 | - * @return Expr |
|
117 | - */ |
|
118 | - public function getOnClick() |
|
119 | - { |
|
120 | - return $this->onClick; |
|
121 | - } |
|
122 | - |
|
123 | - /** |
|
124 | - * @param string $onClick |
|
125 | - * |
|
126 | - * @return $this |
|
127 | - */ |
|
128 | - public function setOnClick($onClick) |
|
129 | - { |
|
130 | - $this->onClick = new Expr(strval($onClick)); |
|
131 | - |
|
132 | - return $this; |
|
133 | - } |
|
134 | - |
|
135 | - /** |
|
136 | - * @return Expr |
|
137 | - */ |
|
138 | - public function getOnHover() |
|
139 | - { |
|
140 | - return $this->onHover; |
|
141 | - } |
|
142 | - |
|
143 | - /** |
|
144 | - * @param string $onHover |
|
145 | - * |
|
146 | - * @return $this |
|
147 | - */ |
|
148 | - public function setOnHover($onHover) |
|
149 | - { |
|
150 | - $this->onHover = new Expr(strval($onHover)); |
|
151 | - |
|
152 | - return $this; |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * @return LabelsCollection |
|
157 | - */ |
|
158 | - public function labels() |
|
159 | - { |
|
160 | - if (is_null($this->labels)) { |
|
161 | - $this->labels = new LabelsCollection(); |
|
162 | - } |
|
163 | - |
|
164 | - return $this->labels; |
|
165 | - } |
|
166 | - |
|
167 | - /** |
|
168 | - * @return bool |
|
169 | - */ |
|
170 | - public function isReverse() |
|
171 | - { |
|
172 | - return $this->reverse; |
|
173 | - } |
|
174 | - |
|
175 | - /** |
|
176 | - * @param bool $reverse |
|
177 | - * |
|
178 | - * @return $this |
|
179 | - */ |
|
180 | - public function setReverse($reverse) |
|
181 | - { |
|
182 | - $this->reverse = boolval($reverse); |
|
183 | - |
|
184 | - return $this; |
|
185 | - } |
|
186 | - |
|
187 | - /** |
|
188 | - * @return array |
|
189 | - */ |
|
190 | - public function jsonSerialize() |
|
191 | - { |
|
192 | - return $this->getArrayCopy(); |
|
193 | - } |
|
18 | + use ArraySerializable; |
|
19 | + |
|
20 | + /** |
|
21 | + * @var bool |
|
22 | + */ |
|
23 | + private $display; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var string |
|
27 | + */ |
|
28 | + private $position; |
|
29 | + |
|
30 | + /** |
|
31 | + * @var bool |
|
32 | + */ |
|
33 | + private $fullWidth; |
|
34 | + |
|
35 | + /** |
|
36 | + * @var Expr |
|
37 | + */ |
|
38 | + private $onClick; |
|
39 | + |
|
40 | + /** |
|
41 | + * @var Expr |
|
42 | + */ |
|
43 | + private $onHover; |
|
44 | + |
|
45 | + /** |
|
46 | + * @var LabelsCollection |
|
47 | + */ |
|
48 | + private $labels; |
|
49 | + |
|
50 | + /** |
|
51 | + * @var bool |
|
52 | + */ |
|
53 | + private $reverse; |
|
54 | + |
|
55 | + /** |
|
56 | + * @return bool |
|
57 | + */ |
|
58 | + public function isDisplay() |
|
59 | + { |
|
60 | + return $this->display; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * @param bool $display |
|
65 | + * |
|
66 | + * @return $this |
|
67 | + */ |
|
68 | + public function setDisplay($display) |
|
69 | + { |
|
70 | + $this->display = boolval($display); |
|
71 | + |
|
72 | + return $this; |
|
73 | + } |
|
74 | + |
|
75 | + /** |
|
76 | + * @return string |
|
77 | + */ |
|
78 | + public function getPosition() |
|
79 | + { |
|
80 | + return $this->position; |
|
81 | + } |
|
82 | + |
|
83 | + /** |
|
84 | + * @param string $position |
|
85 | + * |
|
86 | + * @return $this |
|
87 | + */ |
|
88 | + public function setPosition($position) |
|
89 | + { |
|
90 | + $this->position = strval($position); |
|
91 | + |
|
92 | + return $this; |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * @return bool |
|
97 | + */ |
|
98 | + public function isFullWidth() |
|
99 | + { |
|
100 | + return $this->fullWidth; |
|
101 | + } |
|
102 | + |
|
103 | + /** |
|
104 | + * @param bool $fullWidth |
|
105 | + * |
|
106 | + * @return $this |
|
107 | + */ |
|
108 | + public function setFullWidth($fullWidth) |
|
109 | + { |
|
110 | + $this->fullWidth = boolval($fullWidth); |
|
111 | + |
|
112 | + return $this; |
|
113 | + } |
|
114 | + |
|
115 | + /** |
|
116 | + * @return Expr |
|
117 | + */ |
|
118 | + public function getOnClick() |
|
119 | + { |
|
120 | + return $this->onClick; |
|
121 | + } |
|
122 | + |
|
123 | + /** |
|
124 | + * @param string $onClick |
|
125 | + * |
|
126 | + * @return $this |
|
127 | + */ |
|
128 | + public function setOnClick($onClick) |
|
129 | + { |
|
130 | + $this->onClick = new Expr(strval($onClick)); |
|
131 | + |
|
132 | + return $this; |
|
133 | + } |
|
134 | + |
|
135 | + /** |
|
136 | + * @return Expr |
|
137 | + */ |
|
138 | + public function getOnHover() |
|
139 | + { |
|
140 | + return $this->onHover; |
|
141 | + } |
|
142 | + |
|
143 | + /** |
|
144 | + * @param string $onHover |
|
145 | + * |
|
146 | + * @return $this |
|
147 | + */ |
|
148 | + public function setOnHover($onHover) |
|
149 | + { |
|
150 | + $this->onHover = new Expr(strval($onHover)); |
|
151 | + |
|
152 | + return $this; |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * @return LabelsCollection |
|
157 | + */ |
|
158 | + public function labels() |
|
159 | + { |
|
160 | + if (is_null($this->labels)) { |
|
161 | + $this->labels = new LabelsCollection(); |
|
162 | + } |
|
163 | + |
|
164 | + return $this->labels; |
|
165 | + } |
|
166 | + |
|
167 | + /** |
|
168 | + * @return bool |
|
169 | + */ |
|
170 | + public function isReverse() |
|
171 | + { |
|
172 | + return $this->reverse; |
|
173 | + } |
|
174 | + |
|
175 | + /** |
|
176 | + * @param bool $reverse |
|
177 | + * |
|
178 | + * @return $this |
|
179 | + */ |
|
180 | + public function setReverse($reverse) |
|
181 | + { |
|
182 | + $this->reverse = boolval($reverse); |
|
183 | + |
|
184 | + return $this; |
|
185 | + } |
|
186 | + |
|
187 | + /** |
|
188 | + * @return array |
|
189 | + */ |
|
190 | + public function jsonSerialize() |
|
191 | + { |
|
192 | + return $this->getArrayCopy(); |
|
193 | + } |
|
194 | 194 | } |
@@ -13,130 +13,130 @@ |
||
13 | 13 | */ |
14 | 14 | class Rectangle implements ArraySerializableInterface, JsonSerializable |
15 | 15 | { |
16 | - use ArraySerializable; |
|
17 | - |
|
18 | - const BORDER_SKIPPED_BOTTOM = 'bottom'; |
|
19 | - const BORDER_SKIPPED_LEFT = 'left'; |
|
20 | - const BORDER_SKIPPED_TOP = 'top'; |
|
21 | - const BORDER_SKIPPED_RIGHT = 'right'; |
|
22 | - |
|
23 | - /** |
|
24 | - * Bar fill color. |
|
25 | - * |
|
26 | - * @default 'rgba(0,0,0,0.1)' |
|
27 | - * @var string |
|
28 | - */ |
|
29 | - private $backgroundColor; |
|
30 | - |
|
31 | - /** |
|
32 | - * Bar stroke width. |
|
33 | - * |
|
34 | - * @default 0 |
|
35 | - * @var int |
|
36 | - */ |
|
37 | - private $borderWidth; |
|
38 | - |
|
39 | - /** |
|
40 | - * Bar stroke color. |
|
41 | - * |
|
42 | - * @default 'rgba(0,0,0,0.1)' |
|
43 | - * @var string |
|
44 | - */ |
|
45 | - private $borderColor; |
|
46 | - |
|
47 | - /** |
|
48 | - * Skipped (excluded) border: 'bottom', 'left', 'top' or 'right'. |
|
49 | - * |
|
50 | - * @default self::BORDER_SKIPPED_BOTTOM |
|
51 | - * @var string |
|
52 | - */ |
|
53 | - private $borderSkipped; |
|
54 | - |
|
55 | - /** |
|
56 | - * @return string |
|
57 | - */ |
|
58 | - public function getBackgroundColor() |
|
59 | - { |
|
60 | - return $this->backgroundColor; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * @param string $backgroundColor |
|
65 | - * |
|
66 | - * @return Rectangle |
|
67 | - */ |
|
68 | - public function setBackgroundColor($backgroundColor) |
|
69 | - { |
|
70 | - $this->backgroundColor = is_null($backgroundColor) ? null : strval($backgroundColor); |
|
71 | - |
|
72 | - return $this; |
|
73 | - } |
|
74 | - |
|
75 | - /** |
|
76 | - * @return int |
|
77 | - */ |
|
78 | - public function getBorderWidth() |
|
79 | - { |
|
80 | - return $this->borderWidth; |
|
81 | - } |
|
82 | - |
|
83 | - /** |
|
84 | - * @param int $borderWidth |
|
85 | - * |
|
86 | - * @return Rectangle |
|
87 | - */ |
|
88 | - public function setBorderWidth($borderWidth) |
|
89 | - { |
|
90 | - $this->borderWidth = intval($borderWidth); |
|
91 | - |
|
92 | - return $this; |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * @return string |
|
97 | - */ |
|
98 | - public function getBorderColor() |
|
99 | - { |
|
100 | - return $this->borderColor; |
|
101 | - } |
|
102 | - |
|
103 | - /** |
|
104 | - * @param string $borderColor |
|
105 | - * |
|
106 | - * @return Rectangle |
|
107 | - */ |
|
108 | - public function setBorderColor($borderColor) |
|
109 | - { |
|
110 | - $this->borderColor = is_null($borderColor) ? null : strval($borderColor); |
|
111 | - |
|
112 | - return $this; |
|
113 | - } |
|
114 | - |
|
115 | - /** |
|
116 | - * @return string |
|
117 | - */ |
|
118 | - public function getBorderSkipped() |
|
119 | - { |
|
120 | - return $this->borderSkipped; |
|
121 | - } |
|
122 | - |
|
123 | - /** |
|
124 | - * @param string $borderSkipped |
|
125 | - * |
|
126 | - * @return Rectangle |
|
127 | - */ |
|
128 | - public function setBorderSkipped($borderSkipped) |
|
129 | - { |
|
130 | - $this->borderSkipped = is_null($borderSkipped) ? null : strval($borderSkipped); |
|
131 | - |
|
132 | - return $this; |
|
133 | - } |
|
134 | - |
|
135 | - /** |
|
136 | - * @return array |
|
137 | - */ |
|
138 | - public function jsonSerialize() |
|
139 | - { |
|
140 | - return $this->getArrayCopy(); |
|
141 | - } |
|
16 | + use ArraySerializable; |
|
17 | + |
|
18 | + const BORDER_SKIPPED_BOTTOM = 'bottom'; |
|
19 | + const BORDER_SKIPPED_LEFT = 'left'; |
|
20 | + const BORDER_SKIPPED_TOP = 'top'; |
|
21 | + const BORDER_SKIPPED_RIGHT = 'right'; |
|
22 | + |
|
23 | + /** |
|
24 | + * Bar fill color. |
|
25 | + * |
|
26 | + * @default 'rgba(0,0,0,0.1)' |
|
27 | + * @var string |
|
28 | + */ |
|
29 | + private $backgroundColor; |
|
30 | + |
|
31 | + /** |
|
32 | + * Bar stroke width. |
|
33 | + * |
|
34 | + * @default 0 |
|
35 | + * @var int |
|
36 | + */ |
|
37 | + private $borderWidth; |
|
38 | + |
|
39 | + /** |
|
40 | + * Bar stroke color. |
|
41 | + * |
|
42 | + * @default 'rgba(0,0,0,0.1)' |
|
43 | + * @var string |
|
44 | + */ |
|
45 | + private $borderColor; |
|
46 | + |
|
47 | + /** |
|
48 | + * Skipped (excluded) border: 'bottom', 'left', 'top' or 'right'. |
|
49 | + * |
|
50 | + * @default self::BORDER_SKIPPED_BOTTOM |
|
51 | + * @var string |
|
52 | + */ |
|
53 | + private $borderSkipped; |
|
54 | + |
|
55 | + /** |
|
56 | + * @return string |
|
57 | + */ |
|
58 | + public function getBackgroundColor() |
|
59 | + { |
|
60 | + return $this->backgroundColor; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * @param string $backgroundColor |
|
65 | + * |
|
66 | + * @return Rectangle |
|
67 | + */ |
|
68 | + public function setBackgroundColor($backgroundColor) |
|
69 | + { |
|
70 | + $this->backgroundColor = is_null($backgroundColor) ? null : strval($backgroundColor); |
|
71 | + |
|
72 | + return $this; |
|
73 | + } |
|
74 | + |
|
75 | + /** |
|
76 | + * @return int |
|
77 | + */ |
|
78 | + public function getBorderWidth() |
|
79 | + { |
|
80 | + return $this->borderWidth; |
|
81 | + } |
|
82 | + |
|
83 | + /** |
|
84 | + * @param int $borderWidth |
|
85 | + * |
|
86 | + * @return Rectangle |
|
87 | + */ |
|
88 | + public function setBorderWidth($borderWidth) |
|
89 | + { |
|
90 | + $this->borderWidth = intval($borderWidth); |
|
91 | + |
|
92 | + return $this; |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * @return string |
|
97 | + */ |
|
98 | + public function getBorderColor() |
|
99 | + { |
|
100 | + return $this->borderColor; |
|
101 | + } |
|
102 | + |
|
103 | + /** |
|
104 | + * @param string $borderColor |
|
105 | + * |
|
106 | + * @return Rectangle |
|
107 | + */ |
|
108 | + public function setBorderColor($borderColor) |
|
109 | + { |
|
110 | + $this->borderColor = is_null($borderColor) ? null : strval($borderColor); |
|
111 | + |
|
112 | + return $this; |
|
113 | + } |
|
114 | + |
|
115 | + /** |
|
116 | + * @return string |
|
117 | + */ |
|
118 | + public function getBorderSkipped() |
|
119 | + { |
|
120 | + return $this->borderSkipped; |
|
121 | + } |
|
122 | + |
|
123 | + /** |
|
124 | + * @param string $borderSkipped |
|
125 | + * |
|
126 | + * @return Rectangle |
|
127 | + */ |
|
128 | + public function setBorderSkipped($borderSkipped) |
|
129 | + { |
|
130 | + $this->borderSkipped = is_null($borderSkipped) ? null : strval($borderSkipped); |
|
131 | + |
|
132 | + return $this; |
|
133 | + } |
|
134 | + |
|
135 | + /** |
|
136 | + * @return array |
|
137 | + */ |
|
138 | + public function jsonSerialize() |
|
139 | + { |
|
140 | + return $this->getArrayCopy(); |
|
141 | + } |
|
142 | 142 | } |