react-native-ios-charts ScatterChart example

March 13, 2016 ยท View on GitHub

import React, { AppRegistry, Component, StyleSheet, View } from 'react-native'; import { ScatterChart } from 'react-native-ios-charts';

class charts extends Component { render() { return ( <ScatterChart config={{ dataSets: [{ values: [10, 20, 5, 8, 15, 30], colors: ['green'], label: '2015' }], labels: ['a', 'b', 'c', 'd'] }} style={styles.chart} /> ); } }

const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF' }, chart: { width: 350, height: 500 } });