react-native-china / react-native-animate-chart

📈 An chart library with animation based on react ART module and Animated.
MIT License
9 stars 2 forks source link
animation chart chart-library charting-library doughnut-chart histogram histograms line-charts pie radar react-native

react-native-animate-chart

An chart library with animation based on ART module.

NPM

Build Status MIT Licence depedencies

Get Started

Before starting using the animate chart library,you have to add the ART module to your project if you are deleloping iOS platform app.

  1. drag node_modules/react-native/Libraries/ART/ART.xcodeproj to you project's libraries foulder
  2. Link the ART.a module

Then save the following code named Demo.js as an component.

const React,{ Components } from 'react';
const RNAChart from 'react-native-animate-chart';

export default class Demo extends Components{
  render(){
    return(
      <RNAChart
        width="320"
        height="300"
        title="Awesome React Native"
        subtitle="library for charting things"
        tootip = {{
          text:function(index,data){
            return `The ${index} data is ${data}`
          }
        }}
        xAxis = {{
          crosshair:true
        }}
      />
    )
  }
}

Then refresh your simulator or shake your device to reload,you will see the animating chart.

😁 Demo project here

TODOS: