ColorAxis   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 11
c 0
b 0
f 0
dl 0
loc 60
ccs 0
cts 9
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setValues() 0 5 1
A setMinValue() 0 5 1
A setMaxValue() 0 5 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class ColorAxis
9
{
10
    use ColorsTrait;
11
12
    /**
13
     * If present, specifies a minimum value for chart color data. Color data values of this value and lower will be
14
     * rendered as the first color in the colorAxis.colors range.
15
     *
16
     * @var int
17
     */
18
    protected $minValue;
19
20
    /**
21
     * If present, specifies a maximum value for chart color data. Color data values of this value and higher will be
22
     * rendered as the last color in the colorAxis.colors range.
23
     *
24
     * @var int
25
     */
26
    protected $maxValue;
27
28
    /**
29
     * If present, controls how values are associated with colors. Each value is associated with the corresponding
30
     * color in the colorAxis.colors array. These values apply to the chart color data. Coloring is done according to
31
     * a gradient of the values specified here. Not specifying a value for this option is equivalent to specifying
32
     * [minValue, maxValue].
33
     *
34
     * @var int[]
35
     */
36
    protected $values;
37
38
    /**
39
     * @return $this
40
     */
41
    public function setMinValue(int $minValue)
42
    {
43
        $this->minValue = $minValue;
44
45
        return $this;
46
    }
47
48
    /**
49
     * @return $this
50
     */
51
    public function setMaxValue(int $maxValue)
52
    {
53
        $this->maxValue = $maxValue;
54
55
        return $this;
56
    }
57
58
    /**
59
     * @param int[] $values
60
     *
61
     * @return $this
62
     */
63
    public function setValues(array $values)
64
    {
65
        $this->values = $values;
66
67
        return $this;
68
    }
69
}
70