ThemeTrait::setTheme()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
trait ThemeTrait
9
{
10
    /**
11
     * A theme is a set of predefined option values that work together to achieve a specific chart behavior or visual
12
     * effect. Currently only one theme is available :
13
     * 'maximized' - Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area.
14
     *   Sets the following options:
15
     *   chartArea: {width: '100%', height: '100%'},
16
     *   legend: {position: 'in'},
17
     *   titlePosition: 'in', axisTitlesPosition: 'in',
18
     *   hAxis: {textPosition: 'in'}, vAxis: {textPosition: 'in'}.
19
     *
20
     * Default: null
21
     *
22
     * @var string
23
     */
24
    protected $theme;
25
26
    /**
27
     * @return $this
28
     */
29 2
    public function setTheme(string $theme)
30
    {
31 2
        $this->theme = $theme;
32
33 2
        return $this;
34
    }
35
}
36