BarChart::makePalette()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 7
nc 1
nop 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
}