Series::getAnnotations()   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\ComboChart;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\Annotations;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\AreaOpacityTrait;
7
use CMEN\GoogleChartsBundle\GoogleCharts\Options\CurveTypeTrait;
8
use CMEN\GoogleChartsBundle\GoogleCharts\Options\FallingColor;
9
use CMEN\GoogleChartsBundle\GoogleCharts\Options\LineSeries;
10
use CMEN\GoogleChartsBundle\GoogleCharts\Options\RisingColor;
11
12
/**
13
 * @author Christophe Meneses
14
 */
15
class Series extends LineSeries
16
{
17
    use AreaOpacityTrait;
18
19
    use CurveTypeTrait;
20
21
    /**
22
     * @var Annotations
23
     */
24
    protected $annotations;
25
26
    /**
27
     * @var FallingColor
28
     */
29
    protected $fallingColor;
30
31
    /**
32
     * @var RisingColor
33
     */
34
    protected $risingColor;
35
36
    /**
37
     * The type of marker for this series. Valid values are 'line', 'area', 'bars', 'candlesticks' and 'steppedArea'.
38
     * Note that bars are actually vertical bars (columns). The default value is specified by the chart's seriesType
39
     * option.
40
     *
41
     * @var string
42
     */
43
    protected $type;
44
45
    public function __construct()
46
    {
47
        $this->annotations = new Annotations();
48
        $this->fallingColor = new FallingColor();
49
        $this->risingColor = new RisingColor();
50
    }
51
52
    public function getAnnotations(): Annotations
53
    {
54
        return $this->annotations;
55
    }
56
57
    public function getFallingColor(): FallingColor
58
    {
59
        return $this->fallingColor;
60
    }
61
62
    public function getRisingColor(): RisingColor
63
    {
64
        return $this->risingColor;
65
    }
66
67
    /**
68
     * @return $this
69
     */
70
    public function setType(string $type)
71
    {
72
        $this->type = $type;
73
74
        return $this;
75
    }
76
}
77