Completed
Pull Request — master (#3)
by
unknown
19:47
created

src/components/bar.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 17
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 13
mnd 0
bc 0
fnc 1
dl 0
loc 17
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
1
import React from 'react';
2
3
export default function Bar(props) {
4
    const {index, width, value, fill} = props.data;
5
6
    return (
7
        <rect
8
            x={index*width}
9
            y={window.innerHeight - value-1}
10
            width={`${width -3}`}
11
            height={value}
12
            stroke='#A0A1A1'
13
            fill={fill}
14
        />
15
    );
16
}
17