BarChart   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 17
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A chartType() 0 3 1
A makePalette() 0 10 1
1
<?php
2
namespace rtens\domin\delivery\web\renderers\charting\charts;
3
4
use rtens\domin\parameters\Color;
5
6
class BarChart extends DataSetChart {
7
8
    public function chartType() {
9
        return "Bar";
10
    }
11
12
    public function makePalette(Color $color) {
13
        list($red, $green, $blue) = $color->asArray();
14
15
        return [
16
            'fillColor' => "rgba($red,$green,$blue,1)",
17
            'strokeColor' => "rgba($red,$green,$blue,0)",
18
            'highlightFill' => "rgba($red,$green,$blue,0.8)",
19
            'highlightStroke' => "rgba($red,$green,$blue,0)",
20
        ];
21
    }
22
}