Last active
March 13, 2016 16:38
-
-
Save Jpadilla1/34e52658683feadbeaaa to your computer and use it in GitHub Desktop.
react-native-ios-charts BubbleChart example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
View | |
} from 'react-native'; | |
import { BubbleChart } from 'react-native-ios-charts'; | |
class charts extends Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<BubbleChart | |
config={{ | |
dataSets: [{ | |
values: [{ | |
value: 5, | |
size: 5 | |
}, { | |
value: 10, | |
size: 20 | |
}], | |
colors: ['green'], | |
label: '2015' | |
}], | |
labels: ['a', 'b', 'c', 'd'] | |
}} | |
style={styles.chart} | |
/> | |
</View> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
backgroundColor: '#F5FCFF' | |
}, | |
chart: { | |
width: 350, | |
height: 500 | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment