-
Notifications
You must be signed in to change notification settings - Fork 146
/
with-different-arcs.js
50 lines (43 loc) · 1.09 KB
/
with-different-arcs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from 'react'
import { PieChart } from 'react-native-svg-charts'
class PieChartWithDifferentArcs extends React.PureComponent {
render() {
const data = [
{
key: 1,
value: 50,
svg: { fill: '#600080' },
arc: { outerRadius: '130%', cornerRadius: 10, }
},
{
key: 2,
value: 50,
svg: { fill: '#9900cc' }
},
{
key: 3,
value: 40,
svg: { fill: '#c61aff' }
},
{
key: 4,
value: 95,
svg: { fill: '#d966ff' }
},
{
key: 5,
value: 35,
svg: { fill: '#ecb3ff' }
}
]
return (
<PieChart
style={{ height: 200 }}
outerRadius={'70%'}
innerRadius={10}
data={data}
/>
)
}
}
export default PieChartWithDifferentArcs