GithubHelp home page GithubHelp logo

rockyxiansheng / rn-art-d3-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marzolfb/rn-art-d3-examples

0.0 1.0 0.0 110 KB

POC work on creating react-native charts using react-native ART and d3 and d3-shape

License: Apache License 2.0

Python 3.55% Java 3.01% JavaScript 83.93% Objective-C 9.51%

rn-art-d3-examples's Introduction

rn-art-d3-examples

demo screenshot

Intro

This is a proof of concept exercise to compare/contrast creating react-native charts (very simple ones) using react-native-pathjs-charts vs using a combination of react-native ART & d3 & d3-shape

The approach here is to take the example app included in react-native-pathjs-charts and reproduce the same charts using "the alternate approach" (rn-art + d3 + d3-shape).

I started with the pie chart and the experience creating that chart gave me enough of a feel for using "the alternate approach", so the pie chart is probably the only chart type I will reimplement with "the alternate approach".

Installation / Running

After cloning this project, running the example should simply be a matter of:

npm install
react-native run-ios

Influences from others

I didn't even realize "the alternate approach" was a possible approach until I read a couple of really great articles (and studied their corresponding github repos):

What's next?

Given that using d3 with react-native is a viable possibility, I wondered if others had created derivative charting libraries based on d3. After some quick googling, I quickly came across c3 which is really interesting looking. So, now I'm wondering, "So, why reinvent the wheel creating chart generators using d3 when c3 has already done that?". The immediate next thought was, "I wonder if anyone has created a react-native or react lib that wraps c3" and sure enough I came across this 2 year old project.

So, now I'm thinking that it would be nice to have a react-native-c3 library to make it super-simple to create react-native charts. I may try this out some day. Needless to say, this whole experience has made me realize that there are actually a number of different ways of creating react-native charts (yet another way I didn't mention above was using victory-native)

Update (12/29/2016): c3.js is a web/browser-based library that doesn't produce raw svg data like d3 does. So, c3js isn't immediately reusable in react-native. Maybe there's a place for react-native-pathjs-charts or victory-native or a brand new d3-based variant of one of the two to provide a resuable chart library compatible with react-native akin to c3js?

rn-art-d3-examples's People

Contributors

marzolfb avatar

Watchers

 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.