ColumnChartOptions::getAnnotations()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\ColumnChart;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedAnimation;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedAnnotations;
7
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedChartOptions;
8
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedHAxis;
9
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AdvancedTooltip;
10
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Bar;
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\IsStackedTrait;
15
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Legend;
16
use CMEN\GoogleChartsBundle\GoogleCharts\Options\OrientationTrait;
17
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ReverseCategoriesTrait;
18
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Trendlines;
19
use CMEN\GoogleChartsBundle\GoogleCharts\Options\VAxesTrait;
20
21
/**
22
 * @author Christophe Meneses
23
 */
24
class ColumnChartOptions extends AdvancedChartOptions
25
{
26
    use DataOpacityTrait;
27
28
    use FocusTargetTrait;
29
30
    use IsStackedTrait;
31
32
    use OrientationTrait;
33
34
    use ReverseCategoriesTrait;
35
36
    use VAxesTrait;
37
38
    /**
39
     * @var AdvancedAnimation
40
     */
41
    protected $animation;
42
43
    /**
44
     * @var AdvancedAnnotations
45
     */
46
    protected $annotations;
47
48
    /**
49
     * @var Bar
50
     */
51
    protected $bar;
52
53
    /**
54
     * @var Explorer
55
     */
56
    protected $explorer;
57
58
    /**
59
     * @var AdvancedHAxis
60
     */
61
    protected $hAxis;
62
63
    /**
64
     * @var Legend
65
     */
66
    protected $legend;
67
68
    /**
69
     * @var AdvancedTooltip
70
     */
71
    protected $tooltip;
72
73
    /**
74
     * Displays trendlines on the charts that support them. By default, linear trendlines are used, but this can be
75
     * customized with the trendlines.n.type option.
76
     *
77
     * @var Trendlines[]
78
     */
79
    protected $trendlines;
80
81 8
    public function __construct()
82
    {
83 8
        parent::__construct();
84
85 8
        $this->animation = new AdvancedAnimation();
86 8
        $this->annotations = new AdvancedAnnotations();
87 8
        $this->bar = new Bar();
88 8
        $this->explorer = new Explorer();
89 8
        $this->hAxis = new AdvancedHAxis();
90 8
        $this->legend = new Legend();
91 8
        $this->tooltip = new AdvancedTooltip();
92
    }
93
94 1
    public function getAnimation(): AdvancedAnimation
95
    {
96 1
        return $this->animation;
97
    }
98
99 1
    public function getAnnotations(): AdvancedAnnotations
100
    {
101 1
        return $this->annotations;
102
    }
103
104 1
    public function getBar(): Bar
105
    {
106 1
        return $this->bar;
107
    }
108
109 1
    public function getExplorer(): Explorer
110
    {
111 1
        return $this->explorer;
112
    }
113
114 1
    public function getHAxis(): AdvancedHAxis
115
    {
116 1
        return $this->hAxis;
117
    }
118
119 1
    public function getLegend(): Legend
120
    {
121 1
        return $this->legend;
122
    }
123
124 1
    public function getTooltip(): AdvancedTooltip
125
    {
126 1
        return $this->tooltip;
127
    }
128
129
    /**
130
     * @param Trendlines[] $trendlines
131
     *
132
     * @return $this
133
     */
134 1
    public function setTrendlines(array $trendlines)
135
    {
136 1
        $this->trendlines = $trendlines;
137
138 1
        return $this;
139
    }
140
}
141