Skip to content

Instantly share code, notes, and snippets.

@Jpadilla1
Last active March 13, 2016 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jpadilla1/34e52658683feadbeaaa to your computer and use it in GitHub Desktop.
Save Jpadilla1/34e52658683feadbeaaa to your computer and use it in GitHub Desktop.
react-native-ios-charts BubbleChart example
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