FocusTargetTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setFocusTarget() 0 5 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
trait FocusTargetTrait
9
{
10
    /**
11
     *  The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse
12
     * click, and which data table element is associated with events. Can be one of the following :
13
     * 'datum' - Focus on a single data point. Correlates to a cell in the data table.
14
     * 'category' - Focus on a grouping of all data points along the major axis. Correlates to a row in the data table.
15
     *
16
     * In focusTarget 'category' the tooltip displays all the category values. This may be useful for comparing values
17
     * of different series.
18
     *
19
     * Default: 'datum'
20
     *
21
     * @var string
22
     */
23
    protected $focusTarget;
24
25
    /**
26
     * @return $this
27
     */
28 2
    public function setFocusTarget(string $focusTarget)
29
    {
30 2
        $this->focusTarget = $focusTarget;
31
32 2
        return $this;
33
    }
34
}
35