Skip to content

Instantly share code, notes, and snippets.

@Jpadilla1
Created March 13, 2016 17:48
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/abbc1e4378e5f6fd7eca to your computer and use it in GitHub Desktop.
Save Jpadilla1/abbc1e4378e5f6fd7eca to your computer and use it in GitHub Desktop.
react-native-ios-charts ScatterChart example
import React, {
AppRegistry,
Component,
StyleSheet,
View
} from 'react-native';
import { ScatterChart } from 'react-native-ios-charts';
class charts extends Component {
render() {
return (
<View style={styles.container}>
<ScatterChart
config={{
dataSets: [{
values: [10, 20, 5, 8, 15, 30],
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