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.

display live data in a line chart

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior If I insert a new data point to a line chart, all data points will be animated. This will lead to a messy data visualization.

At first I tryed to simply push new data points, but it looks like change detection does not recognize this. this.multi[0].series.push(data); Rewriting the whole array works but leads to the described behavior. this.multi[0].series.push(data); this.multi = [...this.multi];

Expected behavior Only the the line for the new data point should be animated. Otherwise it would be good to have a option flag, to turn off animations.

Reproduction of the problem I created a plunkr to show the current behavior:

https://plnkr.co/edit/FXA7r6ISQguTrqAF5YS5?p=preview

What is the motivation / use case for changing the behavior? I would like to create a chart that shows realtime data. Like flot chart does in this example: http://www.flotcharts.org/flot/examples/realtime/index.html

Environment:

  • ngx-charts version: 5.3.1
  • Angular version: 4.0.0
  • Browser: [Chrome]
  • Language: [ TypeScript 2.3.2]

Thank you for your feedback.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:7
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
zerodriftcommented, Jul 3, 2017

Any updates on this?

7reactions
cole21771commented, Jan 30, 2018

An alternative to the fancy horizontal animation (which would be nice), would be to just turn off animations. It isn’t nearly as nice as with horizontal interpolation, but it works.

It looks like this (using a fork of the plunker found above): https://plnkr.co/edit/6GHWvXPZvanbB1FR8dum?p=preview

Read more comments on GitHub >

github_iconTop Results From Across the Web

Real-time 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 >
Present your data in a scatter chart or a line chart
Line charts can display continuous data over time, set against a common scale, and are therefore ideal for showing trends in data at...
Read more >
Line Chart - Google Developers
A line chart that is rendered within the browser using SVG or VML. Displays tooltips when hovering over points. Examples. Curving the Lines....
Read more >
JavaScript Dynamic / Live Line Charts & Graphs | CanvasJS
JavaScript Dynamic charts are used for displaying live data that varies with time. Using Line Chart for Real-time Graph is very common.
Read more >
Displaying real time data on a page with chart.js - YouTube
This is the second of two parts on streaming real time data with the raspberry pi. Here we cover the application of chart.js...
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