Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Commit

Permalink
README setup guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mskec committed Jul 3, 2016
1 parent fcf9c8e commit 3a8c143
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Work in progress

# React Native MPAndroidChart

`react-native-mp-android-chart` is react native wrapper of popular android charting library [MPAndroidChart](https://github.com/PhilJay/MPAndroidChart).
Expand All @@ -11,10 +9,42 @@
- [Example](#example-app)

## Setup
TODO
`npm i react-native-mp-android-chart --save`

**android/settings.gradle**
```
include ':reactNativeMPAndroidChart'
project(':reactNativeMPAndroidChart').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mp-android-chart/android')
```

**android/app/build.gradle**
```
dependencies {
...
compile project(':reactNativeMPAndroidChart')
}
```

**MainActivity.java**

On top where imports are:
```java
import com.github.reactNativeMPAndroidChart.MPAndroidChartPackage;
```

Add package in `getPackages` method:
```java
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new MPAndroidChartPackage() // <----- Add this
);
}
```


## Usage
TODO

## Example app
Example app is available [here](https://github.com/mskec/react-native-mp-android-chart-example).
Example Android application with source code and `apk` is available [here](https://github.com/mskec/react-native-mp-android-chart-example).

0 comments on commit 3a8c143

Please sign in to comment.