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

DataOpacityTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setDataOpacity() 0 6 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