1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\Histogram; |
4
|
|
|
|
5
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedAnimation; |
6
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedChartOptions; |
7
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedLegend; |
8
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Bar; |
9
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\DataOpacityTrait; |
10
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\FocusTargetTrait; |
11
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\InterpolateNullsTrait; |
12
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\IsStackedTrait; |
13
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\MediumTooltip; |
14
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\OrientationTrait; |
15
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ReverseCategoriesTrait; |
16
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\VAxesTrait; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @author Christophe Meneses |
20
|
|
|
*/ |
21
|
|
View Code Duplication |
class HistogramOptions extends AdvancedChartOptions |
|
|
|
|
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* @var AdvancedAnimation |
25
|
|
|
*/ |
26
|
|
|
protected $animation; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var Bar |
30
|
|
|
*/ |
31
|
|
|
protected $bar; |
32
|
|
|
|
33
|
|
|
use DataOpacityTrait; |
34
|
|
|
|
35
|
|
|
use FocusTargetTrait; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var HAxis |
39
|
|
|
*/ |
40
|
|
|
protected $hAxis; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var Histogram |
44
|
|
|
*/ |
45
|
|
|
protected $histogram; |
46
|
|
|
|
47
|
|
|
use InterpolateNullsTrait; |
48
|
|
|
|
49
|
|
|
use IsStackedTrait; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @var AdvancedLegend |
53
|
|
|
*/ |
54
|
|
|
protected $legend; |
55
|
|
|
|
56
|
|
|
use OrientationTrait; |
57
|
|
|
|
58
|
|
|
use ReverseCategoriesTrait; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var MediumTooltip |
62
|
|
|
*/ |
63
|
|
|
protected $tooltip; |
64
|
|
|
|
65
|
|
|
use VAxesTrait; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* HistogramOptions constructor. |
69
|
|
|
*/ |
70
|
|
|
public function __construct() |
71
|
|
|
{ |
72
|
|
|
parent::__construct(); |
73
|
|
|
|
74
|
|
|
$this->animation = new AdvancedAnimation(); |
75
|
|
|
$this->bar = new Bar(); |
76
|
|
|
$this->histogram = new Histogram(); |
77
|
|
|
$this->hAxis = new HAxis(); |
78
|
|
|
$this->legend = new AdvancedLegend(); |
79
|
|
|
$this->tooltip = new MediumTooltip(); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return AdvancedAnimation |
84
|
|
|
*/ |
85
|
|
|
public function getAnimation() |
86
|
|
|
{ |
87
|
|
|
return $this->animation; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return Bar |
92
|
|
|
*/ |
93
|
|
|
public function getBar() |
94
|
|
|
{ |
95
|
|
|
return $this->bar; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return Histogram |
100
|
|
|
*/ |
101
|
|
|
public function getHistogram() |
102
|
|
|
{ |
103
|
|
|
return $this->histogram; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return HAxis |
108
|
|
|
*/ |
109
|
|
|
public function getHAxis() |
110
|
|
|
{ |
111
|
|
|
return $this->hAxis; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return AdvancedLegend |
116
|
|
|
*/ |
117
|
|
|
public function getLegend() |
118
|
|
|
{ |
119
|
|
|
return $this->legend; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @return MediumTooltip |
124
|
|
|
*/ |
125
|
|
|
public function getTooltip() |
126
|
|
|
{ |
127
|
|
|
return $this->tooltip; |
128
|
|
|
} |
129
|
|
|
} |
130
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.