react-native-ios-charts CandleStickChart example

March 13, 2016 ยท View on GitHub

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

class charts extends Component { render() { return ( <CandleStickChart config={{ dataSets: [{ values: [{ shadowH: 20, shadowL: 0, open: 15, close: 5 }, { shadowH: 30, shadowL: 10, open: 25, close: 15 }], 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 } });