GithubHelp home page GithubHelp logo

vladanyes / react-native-skia-charts Goto Github PK

View Code? Open in Web Editor NEW
136.0 7.0 9.0 2.76 MB

High-performance charts for react-native ๐Ÿš€

License: MIT License

JavaScript 4.14% TypeScript 95.86%
graph performance react-native react-native-skia skia charts d3

react-native-skia-charts's Introduction

react-native-skia-charts

High-performance charts for react-native ๐Ÿš€
npm version

This library is under development and is not ready for production use. Yet.

Example

Clone the repo and run one of the following commands to run the example app:

npm run example:ios

or

npm run example:android

Installation

npm install d3-scale
npm install react-native-reanimated
npm install react-native-gesture-handler
npm install @shopify/react-native-skia
npm install react-native-skia-charts

Usage

import { LineChart, StackedBarChart } from 'react-native-skia-charts';
// ...
<LineChart
  datasets={[{
    label: 'Default line',
    color: '#DE5C9D',
    data: [
      {
        x: '2020-01-02',
        y: 10,
      },
      {
        x: '2020-01-03',
        y: 20,
      },
      ...
    ],
  }]}
  fontFile={require("../assets/fonts/Roboto-Regular.ttf")}
/>

Configuration props

datasets (required)

The data to be displayed in the chart. The data should be an array of objects with a date and value properties.

fontFile (required)

A font file to be used in the chart. Example: require("../assets/fonts/Roboto-Regular.ttf")

startDate

If not provided, startDate will be calculated from data prop.

endDate

If not provided, endDate will be calculated from data prop.

onTouchStart

onTouchEnd

fontSize

chartColor

yAxisMax

tension

labelsColor

paddingVertical

paddingHorizontal

tooltip

borderRadius

Chart types

  • Line chart (draft state)
  • Tooltip (todo)
  • Bar chart (draft state)
  • Stacked Bar chart (todo)
  • Multiple lines chart (todo)
  • Donut chart (todo)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Contact me

[email protected]


Made with create-react-native-library

react-native-skia-charts's People

Contributors

adityakmr7 avatar v1ad-r avatar vladanyes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-skia-charts's Issues

Support for stacked bar chart

add stacked bar chart implementation where the data/datasets prop should be similar to this:

  {
    label: 'First item',
    color: 'red',
    data: [
      {
        date: '2020-01-01',
        value: 10,
      },
      ...
    ],
  },
  {
    label: 'Second item',
    color: 'green',
    data: [
      {
        date: '2020-01-02',
        value: 20,
      },
      ...
    ],
  },
  ...
];

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.