Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
285 views
in Technique[技术] by (71.8m points)

angular - I want to display real-time incoming data on the chart. But I don't know what to do

Currently, the line chart of ng2-charts is used by the angular. But I don't know how to make a graph with real-time data.

lineChartData: ChartDataSets[] = [ { data: [10, 20, 30, 40, 100, 125], label: '' } ];

question from:https://stackoverflow.com/questions/65912047/i-want-to-display-real-time-incoming-data-on-the-chart-but-i-dont-know-what-to

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Use some socket to connect and see the data in realtime. A good tool to do this is the Firebase Realtime Database, that you are allowed to write and read data in realtime.

Store and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and remains available when your app goes offline.

The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. When you build cross-platform apps with our iOS, Android, and JavaScript SDKs, all of your clients share one Realtime Database instance and automatically receive updates with the newest data.

Here's a link!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...