Skip to content

Instantly share code, notes, and snippets.

@Jpadilla1
Created March 13, 2016 18:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jpadilla1/b944cd86bdf46cb50977 to your computer and use it in GitHub Desktop.
Save Jpadilla1/b944cd86bdf46cb50977 to your computer and use it in GitHub Desktop.
react-native-ios-charts RadarChart example
import React, {
AppRegistry,
Component,
StyleSheet,
View
} from 'react-native';
import { RadarChart } from 'react-native-ios-charts';
class charts extends Component {
render() {
return (
<View style={styles.container}>
<RadarChart
config={{
dataSets: [{
values: [10, 20, 5, 8, 40, 30, 15, 25, 35],
colors: ['green'],
label: '2014',
drawFilledEnabled: true,
fillColor: 'green',
drawValues: false
}, {
values: [20, 10, 8, 5, 30, 40, 25, 15, 35],
colors: ['red'],
label: '2015',
drawFilledEnabled: true,
fillColor: 'red',
drawValues: false
}],
labels: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
}}
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