2.0.0-beta • Published 4 years ago
react-native-sparkline v2.0.0-beta
react-native-sparkline
An ART-based sparkline component for react-native
Prerequisite
This library is based on ART and works on both Android and iOS platform.
Linking module
For react-native >= 0.60
ReactNativeART should be auto-linked and no additional action is required.
For react-native < 0.60
you need to link ReactNative ART:
react-native link @react-native-community/art
Manual:
Usage
- Install
npm i react-native-sparkline
- Use it
import React from 'react'
import Sparkline from 'react-native-sparkline'
const data = Array.from({ length: 20 }).map(
(unused, i) => i + (i + 1) * Math.random()
)
const App = () => (
<Sparkline data={data}>
<Sparkline.Line />
<Sparkline.Fill />
<Sparkline.Spots />
<Sparkline.Band />
</Sparkline>
)
Example
cd example
npm install
react-native run-ios
orreact-native run-android
License
2.0.0-beta
4 years ago
1.0.5-beta
6 years ago
1.0.4-rc
6 years ago
1.0.4-beta
6 years ago
1.0.3-beta
6 years ago
1.0.2-beta
6 years ago
1.0.1-beta
6 years ago
1.0.0-beta
6 years ago
1.0.0-alpha
6 years ago