BarChart::chartType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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