DataOpacityTrait::setDataOpacity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 0
f 0
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