Test Failed
Push — master ( e6b57e...dd7c2d )
by Christophe
07:44
created

DataOpacityTrait::setDataOpacity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
trait DataOpacityTrait
9
{
10
    /**
11
     * The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent. In scatter,
12
     * histogram, bar, and column charts, this refers to the visible data: dots in the scatter chart and rectangles
13
     * in the others. In charts where selecting data creates a dot, such as the line and area charts, this refers to
14
     * the circles that appear upon hover or selection. The combo chart exhibits both behaviors, and this option has
15
     * no effect on other charts. (To change the opacity of a trendline, see
16
     * {@link https://developers.google.com/chart/interactive/docs/gallery/trendlines#Example4}).
17
     *
18
     * Default: 1.0
19
     *
20
     * @var float
21
     */
22
    protected $dataOpacity;
23
24
    /**
25
     * @param float $dataOpacity
26
     *
27
     * @return $this
28
     */
29
    public function setDataOpacity($dataOpacity)
30
    {
31
        $this->dataOpacity = $dataOpacity;
32
33
        return $this;
34
    }
35
}
36