Code Monkey home page Code Monkey logo

Comments (2)

ElliotWood13 avatar ElliotWood13 commented on May 13, 2024

@mrousavy @chrispader do you have any ideas? 🙏

from react-native-graph.

LeleDallas avatar LeleDallas commented on May 13, 2024

const dataPoints = [{"date": 2023-01-21T17:45:00.000Z, "value": 122549.01960784315}, {"date": 2023-01-22T05:45:00.000Z, "value": 120481.92771084337}, {"date": 2023-01-22T17:45:00.000Z, "value": 120481.92771084337}, {"date": 2023-01-23T05:45:00.000Z, "value": 119760.47904191617}, {"date": 2023-01-23T17:45:00.000Z, "value": 120481.92771084337}, {"date": 2023-01-24T05:45:00.000Z, "value": 121951.21951219514}, {"date": 2023-01-24T17:45:00.000Z, "value": 120481.92771084337}]

<LineGraph points={dataPoints} animated={false} color="#fff" />

The graph does not show when using like this.

If I turn animated to true I then get the following error TypeError: undefined is not an object (evaluating 'gestureConfig.toGestureArray').

Can anyone help? I just want to implement a graph similar to those listed in the docs.

Did you try to set width and height from the style property?
Like this:

<LineGraph
        style={{ width: 300, height: 300 }}
      ...
    />

from react-native-graph.

Related Issues (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.