react-native-ios-charts RadarChart example

March 13, 2016 ยท View on GitHub

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

class charts extends Component { render() { return ( <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} /> ); } }

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