TimelineOptions::getTimeline()   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\Timeline;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\BasicChartOptions;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\BasicTooltip;
7
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ColorsTrait;
8
9
/**
10
 * @author Christophe Meneses
11
 */
12
class TimelineOptions extends BasicChartOptions
13
{
14
    use ColorsTrait;
15
16
    /**
17
     * Whether display elements (e.g., the bars in a timeline) should obscure grid lines. If false, grid lines may be
18
     * covered completely by display elements. If true, display elements may be altered to keep grid lines visible.
19
     *
20
     * @var bool
21
     */
22
    protected $avoidOverlappingGridLines;
23
24
    /**
25
     * The background color for the main area of the chart. Can be either a simple HTML color string, for example :
26
     * 'red' or '#00cc00'.
27
     *
28
     * @var string
29
     */
30
    protected $backgroundColor;
31
32
    /**
33
     * @var Timeline
34
     */
35
    protected $timeline;
36
37
    /**
38
     * @var BasicTooltip
39
     */
40
    protected $tooltip;
41
42
    public function __construct()
43
    {
44
        parent::__construct();
45
46
        $this->timeline = new Timeline();
47
        $this->tooltip = new BasicTooltip();
48
    }
49
50
    public function getTimeline(): Timeline
51
    {
52
        return $this->timeline;
53
    }
54
55
    public function getTooltip(): BasicTooltip
56
    {
57
        return $this->tooltip;
58
    }
59
60
    /**
61
     * @return $this
62
     */
63
    public function setAvoidOverlappingGridLines(bool $avoidOverlappingGridLines)
64
    {
65
        $this->avoidOverlappingGridLines = $avoidOverlappingGridLines;
66
67
        return $this;
68
    }
69
70
    /**
71
     * @return $this
72
     */
73
    public function setBackgroundColor(string $backgroundColor)
74
    {
75
        $this->backgroundColor = $backgroundColor;
76
77
        return $this;
78
    }
79
}
80