Coder Social home page Coder Social logo

redpandatronicsuk / arty-charty Goto Github PK

View Code? Open in Web Editor NEW
43.0 3.0 7.0 62 KB

React Native plugin for rendering charts using ART

License: MIT License

JavaScript 100.00%
chart area-chart bubble-chart stacked-charts candlestick-chart pie-chart render-charts bars-range-chart bars-3d-chart spline

arty-charty's People

Contributors

lprhodes avatar redpandatronicsuk 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

Watchers

 avatar  avatar  avatar

arty-charty's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

ART to react-native-svg migration

There were some issue with the ART library on Android, so I decided to use react-native-svg instead. Not sure if that was a good idea though. I have some general questions, if you know the answer or can otherwise contribute to the discussion, please post a comment.

  1. I read the RN ART implementation is more efficient than react-native-svg, but that some while ago and might have changed. This is the main reason why I decided to use ART rather than react-native-svg in the first place!
  2. ART is already shipped with RN, whilst react-native-svg needs to be installed with npm. For iOS, ART needs to be linked manually in XCode, whilst for react-native-svg you can just use react-native link, so the effort for installing each one is about the same. Is it possible to make the SVG installation automatic by adding a post-install script or something like that to package.json?
  3. Does react-native-svg support the standard Animatable from RN? For ART that didn't work and I ended up writing a custom Tweener class, which updates values on the state in requestAnimatinFrame loop.
  4. What about the name? ARTy Charty no longer makes sense, but SVGy Charty doesn't sound as good. Any suggestions?

TO-DO

  • react-native-svg supports tags, so repeating stuff, such as markers, etc., should be only defined once in and then refer to it with afterwards
  • react-native-svg supports other elements than just Path, so maybe we can remove our functions that make SVG paths from shape parameters. test which is more efficient, probably using the react-native-svg elements
  • Check if all features still work, especially things like strokeDasharray, if I remember correctly, the ART implementation of that feature used slightly different parameters than normal SVG
  • Clean up code - the SVG migration was rather rushed and dirty, needs clean up!!

Display point value above/below each point

Hi dude! I found your chart lib awesome with many configuration possibilities but I was wondering if is possible to display the point value above/below each point.

Can I do it? how?

Thanks a lot!

Can we display some information in the chart?

Hi : )

This lib is so cool and I really love it.
I have one question, can we add some information, like label name, value into the chart (like ArtyChartyPie)?
I can't find the corresponding API in the readme.

Thanks!

Can't find variable: SVG

It has an issue about SVG at

makeYaxis(num, minVal, maxVal) {
const width = this.props.width || Dimensions.get('window').width
let topY = (CHART_HEIGHT+CHART_HEIGHT_OFFSET) - this.maxValue * ((CHART_HEIGHT-MARKER_RADIUS)/this.maxValue);
let bottomY = CHART_HEIGHT+CHART_HEIGHT/2;
let i;
let interval = (bottomY - topY) / num;
let lineVal = this.maxValue;
let lineDecrement = (maxVal - minVal) / num;
let lines = [];
for (i = 0 ; i <= num; i++) {
lines.push(<Path key={i} strokeDash={[0, 0, 4, 6]} stroke="black" strokeWidth={.5} d={M 0 ${topY + interval * i} H ${width}} />);
lines.push(<SVG.Text key={1000+i} fill="black" stroke="white" strokeWidth={1} x={0} y={(topY + interval * i) - 22} font="20px Arial">{lineVal.toFixed(2)}</SVG.Text>);
lineVal -= lineDecrement;
}
return lines;
}

It won't work properly either when charts has a y axis with label.

Fix width

Hi - how do you go about specifying a fixed width for the chart. I'm working with the spline charts and at the moment the width it dynamic based on the data points but ideally it would be a fixed width and the points would spread accordingly.

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.