-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
54 lines (49 loc) · 1.19 KB
/
App.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
51
52
53
54
import React from 'react';
import { SafeAreaView, StyleSheet, View } from 'react-native';
import ReactNativeFusionCharts from 'react-native-fusioncharts';
const chartData = [
{ label: 'Venezuela', value: '250' },
{ label: 'Saudi', value: '260' },
{ label: 'Canada', value: '180' },
{ label: 'Iran', value: '140' },
{ label: 'Russia', value: '115' },
{ label: 'UAE', value: '100' },
{ label: 'US', value: '30' },
{ label: 'China', value: '30' },
];
const chartConfig = {
type: 'column2D',
width: '100%',
height: '400',
dataFormat: 'json',
dataSource: {
chart: {
caption: 'Countries With Most Oil Reserves [2017-18]',
subCaption: 'In MMbbl = One Million barrels',
xAxisName: 'Country',
yAxisName: 'Reserves (MMbbl)',
numberSuffix: 'K',
theme: 'fusion',
exportEnabled: 1,
},
data: chartData,
},
};
const App = () => {
return (
<SafeAreaView style={styles.container}>
<View style={styles.content}>
<ReactNativeFusionCharts chartConfig={chartConfig} />
</View>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
content: {
flex: 1,
},
});
export default App;