question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Line Chart for Streaming Real-time Data

See original GitHub issue

First of all, thank you so much for the great job! I’ve been searching around and this is the best chart library. This is more of a question instead of a problem. Please feel free to share your thoughts.

What is the problem?

Trying to draw the line chart for real time data. I am building an application for vehicle data visualization. The data looks like this { speed: 55 } and the server will send me this data every 0.3 seconds.

I’m looking at this example and trying to build the line chart like this.

The data we passed is an array. However, with my case, the data isn’t prepared and it is real-time data. My question is how to pass or structure this data and pass it in order to animate the line chart.

When does it happen?

What platform?

Android

React Native version: 0.55.4

Code to reproduce

// put code here
const SpeedLineChart = (props) => {
  
    const { vehicleStates } = props.vehicleStates;
    console.log( vehicleStates .speed)
        return (
            <View style = {{ height: 200, flexDirection: 'row'}}>
            <LineChart
                style = {{ height: 300, width: 300}}
                animated = {true}
                animationDuration = {10}
                gridMin = {0}
                gridMax = {100}
                data = { [vehicleStates.speed] }
                svg = {{ stroke: 'rgb(134, 65, 244)' }}
                contentInset = {{ top: 20, bottom: 20 }}
            >
                <Grid/>
            </LineChart>
            </View>
        )
  }

console log output:
speed: 50
speed: 51
speed: 45
speed: 53
...
### Stacktrace (if crash)
-->

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
j-funkcommented, Jan 22, 2019

@Yaweii I am very interested in your results to this query! Would you be able to elaborate on what you ended up with?

1reaction
Yaweiicommented, Jun 8, 2018

@JesperLekland Thanks! I will close this issue for now. Really appreciated your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a time-based line chart with streaming data source
The Time Based Line chart is a chart extension to which the streaming data source can be connected. It can also be connected...
Read more >
Real Time (Self-Updating) Charts - FusionCharts
Real-time charts, also known as data streaming charts, are charts that automatically update themselves after every n seconds, without any page refreshes, ...
Read more >
Line charts in real-time streaming dataset
Hi, I have an issue with charts in the real-time streaming dataset. It has different representations: so the temperature is smooth, but pressure...
Read more >
Streaming in JavaScript - Plotly
Detailed examples of Streaming including changing color, size, log axes, and more in JavaScript.
Read more >
chartjs-plugin-streaming - nagix
chartjs-plugin-streaming. Chart.js plugin for live streaming data. Get Started →. MIT Licensed | Copyright © 2017-2021 Akihiko Kusanagi.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found