PieChart::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 PieChart extends DataPointChart {
7
8
    public function chartType() {
9
        return 'Pie';
10
    }
11
12
    public function makePalette(Color $color) {
13
        list($red, $green, $blue) = $color->asArray();
14
        return [
15
            'color' => "rgba($red,$green,$blue,1)",
16
            'highlight' => "rgba($red,$green,$blue,0.8)",
17
        ];
18
    }
19
}