Giter VIP home page Giter VIP logo

react-native-sparkline's Introduction

react-native-sparkline

npm code style: standard code style: prettier

An ART-based sparkline component for react-native

example screenshot

Prerequisite

This library is based on [ART][art-library] 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: [manual-linking]: https://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking

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

  1. cd example
  2. npm install
  3. react-native run-ios or react-native run-android

License

MIT

react-native-sparkline's People

Contributors

arniu avatar narender2031 avatar vijayst avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.