1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\BubbleChart; |
4
|
|
|
|
5
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedAnimation; |
6
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedChartOptions; |
7
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedColorAxis; |
8
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedLegend; |
9
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\BasicTooltip; |
10
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Explorer; |
11
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\MediumHAxis; |
12
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\SelectionModeTrait; |
13
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\SizeAxis; |
14
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\VAxis; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* @author Christophe Meneses |
18
|
|
|
*/ |
19
|
|
|
class BubbleChartOptions extends AdvancedChartOptions |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* @var AdvancedAnimation |
23
|
|
|
*/ |
24
|
|
|
protected $animation; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @var Bubble |
28
|
|
|
*/ |
29
|
|
|
protected $bubble; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @var AdvancedColorAxis |
33
|
|
|
*/ |
34
|
|
|
protected $colorAxis; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @var Explorer |
38
|
|
|
*/ |
39
|
|
|
protected $explorer; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var MediumHAxis |
43
|
|
|
*/ |
44
|
|
|
protected $hAxis; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @var AdvancedLegend |
48
|
|
|
*/ |
49
|
|
|
protected $legend; |
50
|
|
|
|
51
|
|
|
use SelectionModeTrait; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var SizeAxis |
55
|
|
|
*/ |
56
|
|
|
protected $sizeAxis; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* If true, sorts the bubbles by size so the smaller bubbles appear above the larger bubbles. If false, bubbles |
60
|
|
|
* are sorted according to their order in the DataTable. |
61
|
|
|
* |
62
|
|
|
* @var bool |
63
|
|
|
*/ |
64
|
|
|
protected $sortBubblesBySize; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @var BasicTooltip |
68
|
|
|
*/ |
69
|
|
|
protected $tooltip; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @var VAxis |
73
|
|
|
*/ |
74
|
|
|
protected $vAxis; |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* BubbleChartOptions constructor. |
78
|
|
|
*/ |
79
|
|
|
public function __construct() |
80
|
|
|
{ |
81
|
|
|
parent::__construct(); |
82
|
|
|
|
83
|
|
|
$this->animation = new AdvancedAnimation(); |
84
|
|
|
$this->bubble = new Bubble(); |
85
|
|
|
$this->colorAxis = new AdvancedColorAxis(); |
86
|
|
|
$this->explorer = new Explorer(); |
87
|
|
|
$this->hAxis = new MediumHAxis(); |
88
|
|
|
$this->legend = new AdvancedLegend(); |
89
|
|
|
$this->sizeAxis = new SizeAxis(); |
90
|
|
|
$this->tooltip = new BasicTooltip(); |
91
|
|
|
$this->vAxis = new VAxis(); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return AdvancedAnimation |
96
|
|
|
*/ |
97
|
|
|
public function getAnimation() |
98
|
|
|
{ |
99
|
|
|
return $this->animation; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return Bubble |
104
|
|
|
*/ |
105
|
|
|
public function getBubble() |
106
|
|
|
{ |
107
|
|
|
return $this->bubble; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @return AdvancedColorAxis |
112
|
|
|
*/ |
113
|
|
|
public function getColorAxis() |
114
|
|
|
{ |
115
|
|
|
return $this->colorAxis; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return Explorer |
120
|
|
|
*/ |
121
|
|
|
public function getExplorer() |
122
|
|
|
{ |
123
|
|
|
return $this->explorer; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @return MediumHAxis |
128
|
|
|
*/ |
129
|
|
|
public function getHAxis() |
130
|
|
|
{ |
131
|
|
|
return $this->hAxis; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return AdvancedLegend |
136
|
|
|
*/ |
137
|
|
|
public function getLegend() |
138
|
|
|
{ |
139
|
|
|
return $this->legend; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @return SizeAxis |
144
|
|
|
*/ |
145
|
|
|
public function getSizeAxis() |
146
|
|
|
{ |
147
|
|
|
return $this->sizeAxis; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @return BasicTooltip |
152
|
|
|
*/ |
153
|
|
|
public function getTooltip() |
154
|
|
|
{ |
155
|
|
|
return $this->tooltip; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @return VAxis |
160
|
|
|
*/ |
161
|
|
|
public function getVAxis() |
162
|
|
|
{ |
163
|
|
|
return $this->vAxis; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @param bool $sortBubblesBySize |
168
|
|
|
* |
169
|
|
|
* @return $this |
170
|
|
|
*/ |
171
|
|
|
public function setSortBubblesBySize($sortBubblesBySize) |
172
|
|
|
{ |
173
|
|
|
$this->sortBubblesBySize = $sortBubblesBySize; |
174
|
|
|
|
175
|
|
|
return $this; |
176
|
|
|
} |
177
|
|
|
} |
178
|
|
|
|