Giter Site home page Giter Site logo

Comments (6)

oksktank avatar oksktank commented on July 18, 2024 1

@fkhosrow @Yaweii

It's not possible at released version.
I'll be update this feature as soon as possible.

Thank you

from react-native-pure-chart.

Yaweii avatar Yaweii commented on July 18, 2024

@fkhosrow Hi buddy, I'm trying to build a line chart with real time data. And I saw your comments at other place which directs me here. Would you mind sharing your solutions or ideas? Much appreciated.

from react-native-pure-chart.

fkhosrow avatar fkhosrow commented on July 18, 2024

Hi @Yaweii and @alexandraclaire, I got the chart working "real time". The chart caches the first n input points initially to compute the min/max for scaling. For subsequent calls, the first point is removed and the next new point is added to the existing points (as if the chart is shifting). You can see the source code at fkhosrow/react-native-pure-chart. Note that this code does no animation, there is no concept of series, takes one point data at a time (point has Y and Id values), it does not draw values or points.

from react-native-pure-chart.

oksktank avatar oksktank commented on July 18, 2024

@fkhosrow
It would be nice to me when you share your customized code! It could be a good reference for performance refactoring.

from react-native-pure-chart.

alexandraclaire avatar alexandraclaire commented on July 18, 2024

Did anyone manage to make the chart update as new data comes through? I can't seem to get it working!

from react-native-pure-chart.

panbak avatar panbak commented on July 18, 2024

I know it's 2 years later, but maybe I can help those who are trying to solve it right now. Although it is not real-time you can reload/update the line chart with "conditional rendering". This is the solution I used to my problem:
{ !hasSelectedDate ? <Text>Select end date</Text> : <PureChart data={data} type='line' /> }
So I guess you can just change a variable from true to false and then again to true, to force the LineChart component to re-render with the new data. Probably not a good solution, but it worked for me.

from react-native-pure-chart.

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.