1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\LineChart; |
4
|
|
|
|
5
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedAnimation; |
6
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedHAxis; |
7
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedLegend; |
8
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Annotations; |
9
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Crosshair; |
10
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\CurveTypeTrait; |
11
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\DataOpacityTrait; |
12
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Explorer; |
13
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\FocusTargetTrait; |
14
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\InterpolateNullsTrait; |
15
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\LineOptions; |
16
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\OrientationTrait; |
17
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ReverseCategoriesTrait; |
18
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\SelectionModeTrait; |
19
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Trendlines; |
20
|
|
|
use CMEN\GoogleChartsBundle\GoogleCharts\Options\VAxesTrait; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @author Christophe Meneses |
24
|
|
|
*/ |
25
|
|
|
class LineChartOptions extends LineOptions |
26
|
|
|
{ |
27
|
|
|
/** |
28
|
|
|
* @var AdvancedAnimation |
29
|
|
|
*/ |
30
|
|
|
protected $animation; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var Annotations |
34
|
|
|
*/ |
35
|
|
|
protected $annotations; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var Crosshair |
39
|
|
|
*/ |
40
|
|
|
protected $crosshair; |
41
|
|
|
|
42
|
|
|
use CurveTypeTrait; |
43
|
|
|
|
44
|
|
|
use DataOpacityTrait; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @var Explorer |
48
|
|
|
*/ |
49
|
|
|
protected $explorer; |
50
|
|
|
|
51
|
|
|
use FocusTargetTrait; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var AdvancedHAxis |
55
|
|
|
*/ |
56
|
|
|
protected $hAxis; |
57
|
|
|
|
58
|
|
|
use InterpolateNullsTrait; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var AdvancedLegend |
62
|
|
|
*/ |
63
|
|
|
protected $legend; |
64
|
|
|
|
65
|
|
|
use OrientationTrait; |
66
|
|
|
|
67
|
|
|
use ReverseCategoriesTrait; |
68
|
|
|
|
69
|
|
|
use SelectionModeTrait; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* Displays trendlines on the charts that support them. By default, linear trendlines are used, but this can be |
73
|
|
|
* customized with the trendlines.n.type option. |
74
|
|
|
* |
75
|
|
|
* @var Trendlines[] |
76
|
|
|
*/ |
77
|
|
|
protected $trendlines; |
78
|
|
|
|
79
|
|
|
use VAxesTrait; |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* LineChartOptions constructor. |
83
|
|
|
*/ |
84
|
|
|
public function __construct() |
85
|
|
|
{ |
86
|
|
|
parent::__construct(); |
87
|
|
|
|
88
|
|
|
$this->animation = new AdvancedAnimation(); |
89
|
|
|
$this->annotations = new Annotations(); |
90
|
|
|
$this->crosshair = new Crosshair(); |
91
|
|
|
$this->explorer = new Explorer(); |
92
|
|
|
$this->hAxis = new AdvancedHAxis(); |
93
|
|
|
$this->legend = new AdvancedLegend(); |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @return AdvancedAnimation |
98
|
|
|
*/ |
99
|
|
|
public function getAnimation() |
100
|
|
|
{ |
101
|
|
|
return $this->animation; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return Annotations |
106
|
|
|
*/ |
107
|
|
|
public function getAnnotations() |
108
|
|
|
{ |
109
|
|
|
return $this->annotations; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @return Crosshair |
114
|
|
|
*/ |
115
|
|
|
public function getCrosshair() |
116
|
|
|
{ |
117
|
|
|
return $this->crosshair; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return Explorer |
122
|
|
|
*/ |
123
|
|
|
public function getExplorer() |
124
|
|
|
{ |
125
|
|
|
return $this->explorer; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @return AdvancedHAxis |
130
|
|
|
*/ |
131
|
|
|
public function getHAxis() |
132
|
|
|
{ |
133
|
|
|
return $this->hAxis; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @return AdvancedLegend |
138
|
|
|
*/ |
139
|
|
|
public function getLegend() |
140
|
|
|
{ |
141
|
|
|
return $this->legend; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @param Trendlines[] $trendlines |
146
|
|
|
* |
147
|
|
|
* @return $this |
148
|
|
|
*/ |
149
|
|
|
public function setTrendlines($trendlines) |
150
|
|
|
{ |
151
|
|
|
$this->trendlines = $trendlines; |
152
|
|
|
|
153
|
|
|
return $this; |
154
|
|
|
} |
155
|
|
|
} |
156
|
|
|
|