DataOpacityTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
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 24
ccs 3
cts 3
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setDataOpacity() 0 5 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
     * @return $this
26
     */
27 2
    public function setDataOpacity(float $dataOpacity)
28
    {
29 2
        $this->dataOpacity = $dataOpacity;
30
31 2
        return $this;
32
    }
33
}
34