ThemeTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 26
ccs 3
cts 3
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setTheme() 0 5 1
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