How to Chart real time streaming data using AreaChart in JAVAFX 2 - Concurrency, Animation, Charting

后端 未结 2 2088
广开言路
广开言路 2021-02-19 04:46

Requirement- Build an animated AreaChart with real time streaming data. Maybe plot 300 data points every 1 sec.

Details- So I need to read real time streaming data from

2条回答
  •  难免孤独
    2021-02-19 04:57

    A big performence drop could come from your data gathering. There is no reason to use an ExecutorService and continuosly add new Threads for execution by it in order to get repetitive data adding. You could settle for a single thread which reads/receives the data and adds it to the queue and start it by calling addToQueue.start(). For it to work properly, you want a loop to run continously in the thread with a delay at the end of each iteration.

提交回复
热议问题