ScatterChartOptions::getCrosshair()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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