From df9269c0511797729bcb768003b26e781689e7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=95=87?= Date: Tue, 18 Apr 2017 14:36:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20reamme=20usage=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 57 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index fff3e21..ab3e7f2 100644 --- a/README.md +++ b/README.md @@ -40,44 +40,45 @@ Then rebuild. ## Usage ```javascript + import React, { StyleSheet, View, Component } from 'react-native'; import Chart from 'react-native-chart'; const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: 'white', - }, - chart: { - width: 200, - height: 200, - }, + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: 'white', + }, + chart: { + width: 200, + height: 200, + }, }); const data = [[ - [0, 1], - [1, 3], - [3, 7], - [4, 9], + [0, 1], + [1, 3], + [3, 7], + [4, 9], ]]; class SimpleChart extends Component { - render() { - return ( - - - - ); - } + render() { + return ( + + + + ); + } } ```