Skip to content

Instantly share code, notes, and snippets.

@Jpadilla1
Last active March 13, 2016 17:49
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/f64a4bb4cf8dfd3921d4 to your computer and use it in GitHub Desktop.
Save Jpadilla1/f64a4bb4cf8dfd3921d4 to your computer and use it in GitHub Desktop.
react-native-ios-charts CandleStickChart example
import React, {
AppRegistry,
Component,
StyleSheet,
View
} from 'react-native';
import { CandleStickChart } from 'react-native-ios-charts';
class charts extends Component {
render() {
return (
<View style={styles.container}>
<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}
/>
</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