Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ This is a demo of using pyqt5 and QChart for show linechart in realtime applicat

## update rate
The elapsed time of each update function is about 0.02-0.024 second, so the refresh frequency should be less than 40Hz.

## requirements

- [PyQt5](https://pypi.org/project/PyQt5/)
- [PyQtChart](https://pypi.org/project/PyQtChart/)
4 changes: 2 additions & 2 deletions lineChart.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ def connectSignals(self):

def onTimerOut(self):
# print('time out')
start = time.clock()
start = time.process_time()
self.myChart.handleUpdate()
QApplication.processEvents()
elapsed = (time.clock() - start)
elapsed = (time.process_time() - start)
print("Time used: %.3fs" % elapsed)

def generateRandomData(self, listCount, valueMax, valueCount):
Expand Down