1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the highcharts-bundle package. |
5
|
|
|
* |
6
|
|
|
* (c) 2017 WEBEWEB |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap; |
13
|
|
|
|
14
|
|
|
use JsonSerializable; |
15
|
|
|
use WBW\Library\Core\Utility\Argument\ArrayUtility; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Highcharts data labels. |
19
|
|
|
* |
20
|
|
|
* @author webeweb <https://github.com/webeweb/> |
21
|
|
|
* @package WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap |
22
|
|
|
* @version 5.0.14 |
23
|
|
|
* @final |
24
|
|
|
*/ |
25
|
|
|
final class HighchartsDataLabels implements JsonSerializable { |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* Align. |
29
|
|
|
* |
30
|
|
|
* @var string |
31
|
|
|
*/ |
32
|
|
|
private $align = "center"; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Allow overlap. |
36
|
|
|
* |
37
|
|
|
* @var boolean |
38
|
|
|
* @since 4.1.0 |
39
|
|
|
*/ |
40
|
|
|
private $allowOverlap = false; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Background color. |
44
|
|
|
* |
45
|
|
|
* @var string |
46
|
|
|
* @since 2.2.1 |
47
|
|
|
*/ |
48
|
|
|
private $backgroundColor; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Border color. |
52
|
|
|
* |
53
|
|
|
* @var string |
54
|
|
|
* @since 2.2.1 |
55
|
|
|
*/ |
56
|
|
|
private $borderColor; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Border radius. |
60
|
|
|
* |
61
|
|
|
* @var integer |
62
|
|
|
* @since 2.2.1 |
63
|
|
|
*/ |
64
|
|
|
private $borderRadius = 0; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Border width. |
68
|
|
|
* |
69
|
|
|
* @var integer |
70
|
|
|
* @since 2.2.1 |
71
|
|
|
*/ |
72
|
|
|
private $borderWidth = 0; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* Class name. |
76
|
|
|
* |
77
|
|
|
* @var string |
78
|
|
|
* @since 5.0.0 |
79
|
|
|
*/ |
80
|
|
|
private $className; |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Color. |
84
|
|
|
* |
85
|
|
|
* @var string |
86
|
|
|
*/ |
87
|
|
|
private $color; |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* Crop. |
91
|
|
|
* |
92
|
|
|
* @var boolean |
93
|
|
|
* @since 2.3.3 |
94
|
|
|
*/ |
95
|
|
|
private $crop = true; |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* Defer. |
99
|
|
|
* |
100
|
|
|
* @var boolean |
101
|
|
|
* @since 4.1.0 |
102
|
|
|
*/ |
103
|
|
|
private $defer = false; |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Enabled. |
107
|
|
|
* |
108
|
|
|
* @var boolean |
109
|
|
|
* @since 4.1.0 |
110
|
|
|
*/ |
111
|
|
|
private $enabled = true; |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* Format. |
115
|
|
|
* |
116
|
|
|
* @var string |
117
|
|
|
* @since 3.0 |
118
|
|
|
*/ |
119
|
|
|
private $format = "{y}"; |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* Formatter. |
123
|
|
|
* |
124
|
|
|
* @var string |
125
|
|
|
*/ |
126
|
|
|
private $formatter; |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Inside. |
130
|
|
|
* |
131
|
|
|
* @var boolean |
132
|
|
|
* @since 4.1.0 |
133
|
|
|
*/ |
134
|
|
|
private $inside = true; |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* Overflow. |
138
|
|
|
* |
139
|
|
|
* @var string |
140
|
|
|
* @since 3.0.6 |
141
|
|
|
*/ |
142
|
|
|
private $overflow = "justify"; |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Padding. |
146
|
|
|
* |
147
|
|
|
* @var integer |
148
|
|
|
* @since 2.2.1 |
149
|
|
|
*/ |
150
|
|
|
private $padding = 5; |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* Rotation. |
154
|
|
|
* |
155
|
|
|
* @var integer |
156
|
|
|
*/ |
157
|
|
|
private $rotation = 0; |
158
|
|
|
|
159
|
|
|
/** |
160
|
|
|
* Shadow. |
161
|
|
|
* |
162
|
|
|
* @var boolean|array |
163
|
|
|
* @since 2.2.1 |
164
|
|
|
*/ |
165
|
|
|
private $shadow = false; |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* Shape. |
169
|
|
|
* |
170
|
|
|
* @var string |
171
|
|
|
* @since 4.1.2 |
172
|
|
|
*/ |
173
|
|
|
private $shape = "square"; |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* Style. |
177
|
|
|
* |
178
|
|
|
* @var array |
179
|
|
|
* @since 4.1.0 |
180
|
|
|
*/ |
181
|
|
|
private $style = ["color" => "contrast", "fontSize" => "11px", "fontWeight" => "bold", "textOutline" => "1px contrast"]; |
182
|
|
|
|
183
|
|
|
/** |
184
|
|
|
* Use HTML. |
185
|
|
|
* |
186
|
|
|
* @var boolean |
187
|
|
|
*/ |
188
|
|
|
private $useHTML = false; |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* Vertical align. |
192
|
|
|
* |
193
|
|
|
* @var string |
194
|
|
|
* @since 4.1.0 |
195
|
|
|
*/ |
196
|
|
|
private $verticalAlign = "middle"; |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* X. |
200
|
|
|
* |
201
|
|
|
* @var integer |
202
|
|
|
*/ |
203
|
|
|
private $x = 0; |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* Y. |
207
|
|
|
* |
208
|
|
|
* @var integer |
209
|
|
|
*/ |
210
|
|
|
private $y = -6; |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* Z index. |
214
|
|
|
* |
215
|
|
|
* @var integer |
216
|
|
|
* @since 2.3.5 |
217
|
|
|
*/ |
218
|
|
|
private $zIndex = 6; |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* Constructor. |
222
|
|
|
* |
223
|
|
|
* @param boolean $ignoreDefaultValues Ignore the default values. |
224
|
|
|
*/ |
225
|
|
|
public function __construct($ignoreDefaultValues = true) { |
226
|
|
|
if (true === $ignoreDefaultValues) { |
227
|
|
|
$this->clear(); |
228
|
|
|
} |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* Clear. |
233
|
|
|
* |
234
|
|
|
* @return void |
235
|
|
|
*/ |
236
|
|
|
public function clear() { |
237
|
|
|
|
238
|
|
|
// Clear the align. |
239
|
|
|
$this->align = null; |
240
|
|
|
|
241
|
|
|
// Clear the allow overlap. |
242
|
|
|
$this->allowOverlap = null; |
243
|
|
|
|
244
|
|
|
// Clear the background color. |
245
|
|
|
$this->backgroundColor = null; |
246
|
|
|
|
247
|
|
|
// Clear the border color. |
248
|
|
|
$this->borderColor = null; |
249
|
|
|
|
250
|
|
|
// Clear the border radius. |
251
|
|
|
$this->borderRadius = null; |
252
|
|
|
|
253
|
|
|
// Clear the border width. |
254
|
|
|
$this->borderWidth = null; |
255
|
|
|
|
256
|
|
|
// Clear the class name. |
257
|
|
|
$this->className = null; |
258
|
|
|
|
259
|
|
|
// Clear the color. |
260
|
|
|
$this->color = null; |
261
|
|
|
|
262
|
|
|
// Clear the crop. |
263
|
|
|
$this->crop = null; |
264
|
|
|
|
265
|
|
|
// Clear the defer. |
266
|
|
|
$this->defer = null; |
267
|
|
|
|
268
|
|
|
// Clear the enabled. |
269
|
|
|
$this->enabled = null; |
270
|
|
|
|
271
|
|
|
// Clear the format. |
272
|
|
|
$this->format = null; |
273
|
|
|
|
274
|
|
|
// Clear the formatter. |
275
|
|
|
$this->formatter = null; |
276
|
|
|
|
277
|
|
|
// Clear the inside. |
278
|
|
|
$this->inside = null; |
279
|
|
|
|
280
|
|
|
// Clear the overflow. |
281
|
|
|
$this->overflow = null; |
282
|
|
|
|
283
|
|
|
// Clear the padding. |
284
|
|
|
$this->padding = null; |
285
|
|
|
|
286
|
|
|
// Clear the rotation. |
287
|
|
|
$this->rotation = null; |
288
|
|
|
|
289
|
|
|
// Clear the shadow. |
290
|
|
|
$this->shadow = null; |
291
|
|
|
|
292
|
|
|
// Clear the shape. |
293
|
|
|
$this->shape = null; |
294
|
|
|
|
295
|
|
|
// Clear the style. |
296
|
|
|
$this->style = null; |
|
|
|
|
297
|
|
|
|
298
|
|
|
// Clear the use HTML. |
299
|
|
|
$this->useHTML = null; |
300
|
|
|
|
301
|
|
|
// Clear the vertical align. |
302
|
|
|
$this->verticalAlign = null; |
303
|
|
|
|
304
|
|
|
// Clear the x. |
305
|
|
|
$this->x = null; |
306
|
|
|
|
307
|
|
|
// Clear the y. |
308
|
|
|
$this->y = null; |
309
|
|
|
|
310
|
|
|
// Clear the z index. |
311
|
|
|
$this->zIndex = null; |
312
|
|
|
} |
313
|
|
|
|
314
|
|
|
/** |
315
|
|
|
* Get the align. |
316
|
|
|
* |
317
|
|
|
* @return string Returns the align. |
318
|
|
|
*/ |
319
|
|
|
public function getAlign() { |
320
|
|
|
return $this->align; |
321
|
|
|
} |
322
|
|
|
|
323
|
|
|
/** |
324
|
|
|
* Get the allow overlap. |
325
|
|
|
* |
326
|
|
|
* @return boolean Returns the allow overlap. |
327
|
|
|
*/ |
328
|
|
|
public function getAllowOverlap() { |
329
|
|
|
return $this->allowOverlap; |
330
|
|
|
} |
331
|
|
|
|
332
|
|
|
/** |
333
|
|
|
* Get the background color. |
334
|
|
|
* |
335
|
|
|
* @return string Returns the background color. |
336
|
|
|
*/ |
337
|
|
|
public function getBackgroundColor() { |
338
|
|
|
return $this->backgroundColor; |
339
|
|
|
} |
340
|
|
|
|
341
|
|
|
/** |
342
|
|
|
* Get the border color. |
343
|
|
|
* |
344
|
|
|
* @return string Returns the border color. |
345
|
|
|
*/ |
346
|
|
|
public function getBorderColor() { |
347
|
|
|
return $this->borderColor; |
348
|
|
|
} |
349
|
|
|
|
350
|
|
|
/** |
351
|
|
|
* Get the border radius. |
352
|
|
|
* |
353
|
|
|
* @return integer Returns the border radius. |
354
|
|
|
*/ |
355
|
|
|
public function getBorderRadius() { |
356
|
|
|
return $this->borderRadius; |
357
|
|
|
} |
358
|
|
|
|
359
|
|
|
/** |
360
|
|
|
* Get the border width. |
361
|
|
|
* |
362
|
|
|
* @return integer Returns the border width. |
363
|
|
|
*/ |
364
|
|
|
public function getBorderWidth() { |
365
|
|
|
return $this->borderWidth; |
366
|
|
|
} |
367
|
|
|
|
368
|
|
|
/** |
369
|
|
|
* Get the class name. |
370
|
|
|
* |
371
|
|
|
* @return string Returns the class name. |
372
|
|
|
*/ |
373
|
|
|
public function getClassName() { |
374
|
|
|
return $this->className; |
375
|
|
|
} |
376
|
|
|
|
377
|
|
|
/** |
378
|
|
|
* Get the color. |
379
|
|
|
* |
380
|
|
|
* @return string Returns the color. |
381
|
|
|
*/ |
382
|
|
|
public function getColor() { |
383
|
|
|
return $this->color; |
384
|
|
|
} |
385
|
|
|
|
386
|
|
|
/** |
387
|
|
|
* Get the crop. |
388
|
|
|
* |
389
|
|
|
* @return boolean Returns the crop. |
390
|
|
|
*/ |
391
|
|
|
public function getCrop() { |
392
|
|
|
return $this->crop; |
393
|
|
|
} |
394
|
|
|
|
395
|
|
|
/** |
396
|
|
|
* Get the defer. |
397
|
|
|
* |
398
|
|
|
* @return boolean Returns the defer. |
399
|
|
|
*/ |
400
|
|
|
public function getDefer() { |
401
|
|
|
return $this->defer; |
402
|
|
|
} |
403
|
|
|
|
404
|
|
|
/** |
405
|
|
|
* Get the enabled. |
406
|
|
|
* |
407
|
|
|
* @return boolean Returns the enabled. |
408
|
|
|
*/ |
409
|
|
|
public function getEnabled() { |
410
|
|
|
return $this->enabled; |
411
|
|
|
} |
412
|
|
|
|
413
|
|
|
/** |
414
|
|
|
* Get the format. |
415
|
|
|
* |
416
|
|
|
* @return string Returns the format. |
417
|
|
|
*/ |
418
|
|
|
public function getFormat() { |
419
|
|
|
return $this->format; |
420
|
|
|
} |
421
|
|
|
|
422
|
|
|
/** |
423
|
|
|
* Get the formatter. |
424
|
|
|
* |
425
|
|
|
* @return string Returns the formatter. |
426
|
|
|
*/ |
427
|
|
|
public function getFormatter() { |
428
|
|
|
return $this->formatter; |
429
|
|
|
} |
430
|
|
|
|
431
|
|
|
/** |
432
|
|
|
* Get the inside. |
433
|
|
|
* |
434
|
|
|
* @return boolean Returns the inside. |
435
|
|
|
*/ |
436
|
|
|
public function getInside() { |
437
|
|
|
return $this->inside; |
438
|
|
|
} |
439
|
|
|
|
440
|
|
|
/** |
441
|
|
|
* Get the overflow. |
442
|
|
|
* |
443
|
|
|
* @return string Returns the overflow. |
444
|
|
|
*/ |
445
|
|
|
public function getOverflow() { |
446
|
|
|
return $this->overflow; |
447
|
|
|
} |
448
|
|
|
|
449
|
|
|
/** |
450
|
|
|
* Get the padding. |
451
|
|
|
* |
452
|
|
|
* @return integer Returns the padding. |
453
|
|
|
*/ |
454
|
|
|
public function getPadding() { |
455
|
|
|
return $this->padding; |
456
|
|
|
} |
457
|
|
|
|
458
|
|
|
/** |
459
|
|
|
* Get the rotation. |
460
|
|
|
* |
461
|
|
|
* @return integer Returns the rotation. |
462
|
|
|
*/ |
463
|
|
|
public function getRotation() { |
464
|
|
|
return $this->rotation; |
465
|
|
|
} |
466
|
|
|
|
467
|
|
|
/** |
468
|
|
|
* Get the shadow. |
469
|
|
|
* |
470
|
|
|
* @return boolean|array Returns the shadow. |
471
|
|
|
*/ |
472
|
|
|
public function getShadow() { |
473
|
|
|
return $this->shadow; |
474
|
|
|
} |
475
|
|
|
|
476
|
|
|
/** |
477
|
|
|
* Get the shape. |
478
|
|
|
* |
479
|
|
|
* @return string Returns the shape. |
480
|
|
|
*/ |
481
|
|
|
public function getShape() { |
482
|
|
|
return $this->shape; |
483
|
|
|
} |
484
|
|
|
|
485
|
|
|
/** |
486
|
|
|
* Get the style. |
487
|
|
|
* |
488
|
|
|
* @return array Returns the style. |
489
|
|
|
*/ |
490
|
|
|
public function getStyle() { |
491
|
|
|
return $this->style; |
492
|
|
|
} |
493
|
|
|
|
494
|
|
|
/** |
495
|
|
|
* Get the use HTML. |
496
|
|
|
* |
497
|
|
|
* @return boolean Returns the use HTML. |
498
|
|
|
*/ |
499
|
|
|
public function getUseHTML() { |
500
|
|
|
return $this->useHTML; |
501
|
|
|
} |
502
|
|
|
|
503
|
|
|
/** |
504
|
|
|
* Get the vertical align. |
505
|
|
|
* |
506
|
|
|
* @return string Returns the vertical align. |
507
|
|
|
*/ |
508
|
|
|
public function getVerticalAlign() { |
509
|
|
|
return $this->verticalAlign; |
510
|
|
|
} |
511
|
|
|
|
512
|
|
|
/** |
513
|
|
|
* Get the x. |
514
|
|
|
* |
515
|
|
|
* @return integer Returns the x. |
516
|
|
|
*/ |
517
|
|
|
public function getX() { |
518
|
|
|
return $this->x; |
519
|
|
|
} |
520
|
|
|
|
521
|
|
|
/** |
522
|
|
|
* Get the y. |
523
|
|
|
* |
524
|
|
|
* @return integer Returns the y. |
525
|
|
|
*/ |
526
|
|
|
public function getY() { |
527
|
|
|
return $this->y; |
528
|
|
|
} |
529
|
|
|
|
530
|
|
|
/** |
531
|
|
|
* Get the z index. |
532
|
|
|
* |
533
|
|
|
* @return integer Returns the z index. |
534
|
|
|
*/ |
535
|
|
|
public function getZIndex() { |
536
|
|
|
return $this->zIndex; |
537
|
|
|
} |
538
|
|
|
|
539
|
|
|
/** |
540
|
|
|
* Serialize this instance. |
541
|
|
|
* |
542
|
|
|
* @return array Returns an array representing this instance. |
543
|
|
|
*/ |
544
|
|
|
public function jsonSerialize() { |
545
|
|
|
return $this->toArray(); |
546
|
|
|
} |
547
|
|
|
|
548
|
|
|
/** |
549
|
|
|
* Set the align. |
550
|
|
|
* |
551
|
|
|
* @param string $align The align. |
552
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
553
|
|
|
*/ |
554
|
|
|
public function setAlign($align) { |
555
|
|
|
switch ($align) { |
556
|
|
|
case "center": |
557
|
|
|
case "left": |
558
|
|
|
case "right": |
559
|
|
|
$this->align = $align; |
560
|
|
|
break; |
561
|
|
|
} |
562
|
|
|
return $this; |
563
|
|
|
} |
564
|
|
|
|
565
|
|
|
/** |
566
|
|
|
* Set the allow overlap. |
567
|
|
|
* |
568
|
|
|
* @param boolean $allowOverlap The allow overlap. |
569
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
570
|
|
|
*/ |
571
|
|
|
public function setAllowOverlap($allowOverlap) { |
572
|
|
|
$this->allowOverlap = $allowOverlap; |
573
|
|
|
return $this; |
574
|
|
|
} |
575
|
|
|
|
576
|
|
|
/** |
577
|
|
|
* Set the background color. |
578
|
|
|
* |
579
|
|
|
* @param string $backgroundColor The background color. |
580
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
581
|
|
|
*/ |
582
|
|
|
public function setBackgroundColor($backgroundColor) { |
583
|
|
|
$this->backgroundColor = $backgroundColor; |
584
|
|
|
return $this; |
585
|
|
|
} |
586
|
|
|
|
587
|
|
|
/** |
588
|
|
|
* Set the border color. |
589
|
|
|
* |
590
|
|
|
* @param string $borderColor The border color. |
591
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
592
|
|
|
*/ |
593
|
|
|
public function setBorderColor($borderColor) { |
594
|
|
|
$this->borderColor = $borderColor; |
595
|
|
|
return $this; |
596
|
|
|
} |
597
|
|
|
|
598
|
|
|
/** |
599
|
|
|
* Set the border radius. |
600
|
|
|
* |
601
|
|
|
* @param integer $borderRadius The border radius. |
602
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
603
|
|
|
*/ |
604
|
|
|
public function setBorderRadius($borderRadius) { |
605
|
|
|
$this->borderRadius = $borderRadius; |
606
|
|
|
return $this; |
607
|
|
|
} |
608
|
|
|
|
609
|
|
|
/** |
610
|
|
|
* Set the border width. |
611
|
|
|
* |
612
|
|
|
* @param integer $borderWidth The border width. |
613
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
614
|
|
|
*/ |
615
|
|
|
public function setBorderWidth($borderWidth) { |
616
|
|
|
$this->borderWidth = $borderWidth; |
617
|
|
|
return $this; |
618
|
|
|
} |
619
|
|
|
|
620
|
|
|
/** |
621
|
|
|
* Set the class name. |
622
|
|
|
* |
623
|
|
|
* @param string $className The class name. |
624
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
625
|
|
|
*/ |
626
|
|
|
public function setClassName($className) { |
627
|
|
|
$this->className = $className; |
628
|
|
|
return $this; |
629
|
|
|
} |
630
|
|
|
|
631
|
|
|
/** |
632
|
|
|
* Set the color. |
633
|
|
|
* |
634
|
|
|
* @param string $color The color. |
635
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
636
|
|
|
*/ |
637
|
|
|
public function setColor($color) { |
638
|
|
|
$this->color = $color; |
639
|
|
|
return $this; |
640
|
|
|
} |
641
|
|
|
|
642
|
|
|
/** |
643
|
|
|
* Set the crop. |
644
|
|
|
* |
645
|
|
|
* @param boolean $crop The crop. |
646
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
647
|
|
|
*/ |
648
|
|
|
public function setCrop($crop) { |
649
|
|
|
$this->crop = $crop; |
650
|
|
|
return $this; |
651
|
|
|
} |
652
|
|
|
|
653
|
|
|
/** |
654
|
|
|
* Set the defer. |
655
|
|
|
* |
656
|
|
|
* @param boolean $defer The defer. |
657
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
658
|
|
|
*/ |
659
|
|
|
public function setDefer($defer) { |
660
|
|
|
$this->defer = $defer; |
661
|
|
|
return $this; |
662
|
|
|
} |
663
|
|
|
|
664
|
|
|
/** |
665
|
|
|
* Set the enabled. |
666
|
|
|
* |
667
|
|
|
* @param boolean $enabled The enabled. |
668
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
669
|
|
|
*/ |
670
|
|
|
public function setEnabled($enabled) { |
671
|
|
|
$this->enabled = $enabled; |
672
|
|
|
return $this; |
673
|
|
|
} |
674
|
|
|
|
675
|
|
|
/** |
676
|
|
|
* Set the format. |
677
|
|
|
* |
678
|
|
|
* @param string $format The format. |
679
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
680
|
|
|
*/ |
681
|
|
|
public function setFormat($format) { |
682
|
|
|
$this->format = $format; |
683
|
|
|
return $this; |
684
|
|
|
} |
685
|
|
|
|
686
|
|
|
/** |
687
|
|
|
* Set the formatter. |
688
|
|
|
* |
689
|
|
|
* @param string $formatter The formatter. |
690
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
691
|
|
|
*/ |
692
|
|
|
public function setFormatter($formatter) { |
693
|
|
|
$this->formatter = $formatter; |
694
|
|
|
return $this; |
695
|
|
|
} |
696
|
|
|
|
697
|
|
|
/** |
698
|
|
|
* Set the inside. |
699
|
|
|
* |
700
|
|
|
* @param boolean $inside The inside. |
701
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
702
|
|
|
*/ |
703
|
|
|
public function setInside($inside) { |
704
|
|
|
$this->inside = $inside; |
705
|
|
|
return $this; |
706
|
|
|
} |
707
|
|
|
|
708
|
|
|
/** |
709
|
|
|
* Set the overflow. |
710
|
|
|
* |
711
|
|
|
* @param string $overflow The overflow. |
712
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
713
|
|
|
*/ |
714
|
|
|
public function setOverflow($overflow) { |
715
|
|
|
switch ($overflow) { |
716
|
|
|
case "justify": |
717
|
|
|
case "none": |
718
|
|
|
$this->overflow = $overflow; |
719
|
|
|
break; |
720
|
|
|
} |
721
|
|
|
return $this; |
722
|
|
|
} |
723
|
|
|
|
724
|
|
|
/** |
725
|
|
|
* Set the padding. |
726
|
|
|
* |
727
|
|
|
* @param integer $padding The padding. |
728
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
729
|
|
|
*/ |
730
|
|
|
public function setPadding($padding) { |
731
|
|
|
$this->padding = $padding; |
732
|
|
|
return $this; |
733
|
|
|
} |
734
|
|
|
|
735
|
|
|
/** |
736
|
|
|
* Set the rotation. |
737
|
|
|
* |
738
|
|
|
* @param integer $rotation The rotation. |
739
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
740
|
|
|
*/ |
741
|
|
|
public function setRotation($rotation) { |
742
|
|
|
$this->rotation = $rotation; |
743
|
|
|
return $this; |
744
|
|
|
} |
745
|
|
|
|
746
|
|
|
/** |
747
|
|
|
* Set the shadow. |
748
|
|
|
* |
749
|
|
|
* @param boolean|array $shadow The shadow. |
750
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
751
|
|
|
*/ |
752
|
|
|
public function setShadow($shadow) { |
753
|
|
|
$this->shadow = $shadow; |
754
|
|
|
return $this; |
755
|
|
|
} |
756
|
|
|
|
757
|
|
|
/** |
758
|
|
|
* Set the shape. |
759
|
|
|
* |
760
|
|
|
* @param string $shape The shape. |
761
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
762
|
|
|
*/ |
763
|
|
|
public function setShape($shape) { |
764
|
|
|
$this->shape = $shape; |
765
|
|
|
return $this; |
766
|
|
|
} |
767
|
|
|
|
768
|
|
|
/** |
769
|
|
|
* Set the style. |
770
|
|
|
* |
771
|
|
|
* @param array $style The style. |
772
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
773
|
|
|
*/ |
774
|
|
|
public function setStyle(array $style = null) { |
775
|
|
|
$this->style = $style; |
|
|
|
|
776
|
|
|
return $this; |
777
|
|
|
} |
778
|
|
|
|
779
|
|
|
/** |
780
|
|
|
* Set the use HTML. |
781
|
|
|
* |
782
|
|
|
* @param boolean $useHTML The use HTML. |
783
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
784
|
|
|
*/ |
785
|
|
|
public function setUseHTML($useHTML) { |
786
|
|
|
$this->useHTML = $useHTML; |
787
|
|
|
return $this; |
788
|
|
|
} |
789
|
|
|
|
790
|
|
|
/** |
791
|
|
|
* Set the vertical align. |
792
|
|
|
* |
793
|
|
|
* @param string $verticalAlign The vertical align. |
794
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
795
|
|
|
*/ |
796
|
|
|
public function setVerticalAlign($verticalAlign) { |
797
|
|
|
$this->verticalAlign = $verticalAlign; |
798
|
|
|
return $this; |
799
|
|
|
} |
800
|
|
|
|
801
|
|
|
/** |
802
|
|
|
* Set the x. |
803
|
|
|
* |
804
|
|
|
* @param integer $x The x. |
805
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
806
|
|
|
*/ |
807
|
|
|
public function setX($x) { |
808
|
|
|
$this->x = $x; |
809
|
|
|
return $this; |
810
|
|
|
} |
811
|
|
|
|
812
|
|
|
/** |
813
|
|
|
* Set the y. |
814
|
|
|
* |
815
|
|
|
* @param integer $y The y. |
816
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
817
|
|
|
*/ |
818
|
|
|
public function setY($y) { |
819
|
|
|
$this->y = $y; |
820
|
|
|
return $this; |
821
|
|
|
} |
822
|
|
|
|
823
|
|
|
/** |
824
|
|
|
* Set the z index. |
825
|
|
|
* |
826
|
|
|
* @param integer $zIndex The z index. |
827
|
|
|
* @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Treemap\HighchartsDataLabels Returns the highcharts data labels. |
828
|
|
|
*/ |
829
|
|
|
public function setZIndex($zIndex) { |
830
|
|
|
$this->zIndex = $zIndex; |
831
|
|
|
return $this; |
832
|
|
|
} |
833
|
|
|
|
834
|
|
|
/** |
835
|
|
|
* Convert into an array representing this instance. |
836
|
|
|
* |
837
|
|
|
* @return array Returns an array representing this instance. |
838
|
|
|
*/ |
839
|
|
|
public function toArray() { |
840
|
|
|
|
841
|
|
|
// Initialize the output. |
842
|
|
|
$output = []; |
843
|
|
|
|
844
|
|
|
// Set the align. |
845
|
|
|
ArrayUtility::set($output, "align", $this->align, [null]); |
846
|
|
|
|
847
|
|
|
// Set the allow overlap. |
848
|
|
|
ArrayUtility::set($output, "allowOverlap", $this->allowOverlap, [null]); |
849
|
|
|
|
850
|
|
|
// Set the background color. |
851
|
|
|
ArrayUtility::set($output, "backgroundColor", $this->backgroundColor, [null]); |
852
|
|
|
|
853
|
|
|
// Set the border color. |
854
|
|
|
ArrayUtility::set($output, "borderColor", $this->borderColor, [null]); |
855
|
|
|
|
856
|
|
|
// Set the border radius. |
857
|
|
|
ArrayUtility::set($output, "borderRadius", $this->borderRadius, [null]); |
858
|
|
|
|
859
|
|
|
// Set the border width. |
860
|
|
|
ArrayUtility::set($output, "borderWidth", $this->borderWidth, [null]); |
861
|
|
|
|
862
|
|
|
// Set the class name. |
863
|
|
|
ArrayUtility::set($output, "className", $this->className, [null]); |
864
|
|
|
|
865
|
|
|
// Set the color. |
866
|
|
|
ArrayUtility::set($output, "color", $this->color, [null]); |
867
|
|
|
|
868
|
|
|
// Set the crop. |
869
|
|
|
ArrayUtility::set($output, "crop", $this->crop, [null]); |
870
|
|
|
|
871
|
|
|
// Set the defer. |
872
|
|
|
ArrayUtility::set($output, "defer", $this->defer, [null]); |
873
|
|
|
|
874
|
|
|
// Set the enabled. |
875
|
|
|
ArrayUtility::set($output, "enabled", $this->enabled, [null]); |
876
|
|
|
|
877
|
|
|
// Set the format. |
878
|
|
|
ArrayUtility::set($output, "format", $this->format, [null]); |
879
|
|
|
|
880
|
|
|
// Set the formatter. |
881
|
|
|
ArrayUtility::set($output, "formatter", $this->formatter, [null]); |
882
|
|
|
|
883
|
|
|
// Set the inside. |
884
|
|
|
ArrayUtility::set($output, "inside", $this->inside, [null]); |
885
|
|
|
|
886
|
|
|
// Set the overflow. |
887
|
|
|
ArrayUtility::set($output, "overflow", $this->overflow, [null]); |
888
|
|
|
|
889
|
|
|
// Set the padding. |
890
|
|
|
ArrayUtility::set($output, "padding", $this->padding, [null]); |
891
|
|
|
|
892
|
|
|
// Set the rotation. |
893
|
|
|
ArrayUtility::set($output, "rotation", $this->rotation, [null]); |
894
|
|
|
|
895
|
|
|
// Set the shadow. |
896
|
|
|
ArrayUtility::set($output, "shadow", $this->shadow, [null]); |
897
|
|
|
|
898
|
|
|
// Set the shape. |
899
|
|
|
ArrayUtility::set($output, "shape", $this->shape, [null]); |
900
|
|
|
|
901
|
|
|
// Set the style. |
902
|
|
|
ArrayUtility::set($output, "style", $this->style, [null]); |
903
|
|
|
|
904
|
|
|
// Set the use HTML. |
905
|
|
|
ArrayUtility::set($output, "useHTML", $this->useHTML, [null]); |
906
|
|
|
|
907
|
|
|
// Set the vertical align. |
908
|
|
|
ArrayUtility::set($output, "verticalAlign", $this->verticalAlign, [null]); |
909
|
|
|
|
910
|
|
|
// Set the x. |
911
|
|
|
ArrayUtility::set($output, "x", $this->x, [null]); |
912
|
|
|
|
913
|
|
|
// Set the y. |
914
|
|
|
ArrayUtility::set($output, "y", $this->y, [null]); |
915
|
|
|
|
916
|
|
|
// Set the z index. |
917
|
|
|
ArrayUtility::set($output, "zIndex", $this->zIndex, [null]); |
918
|
|
|
|
919
|
|
|
// Return the output. |
920
|
|
|
return $output; |
921
|
|
|
} |
922
|
|
|
|
923
|
|
|
} |
924
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..