From 9d79112dd709f4b9ca61bb6b5bd211a79f6105c7 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 18 Jul 2019 16:55:12 +0800 Subject: [PATCH] [Mod] update cursor info pos after new bar updated --- examples/candle_chart/run.py | 2 +- vnpy/chart/widget.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/candle_chart/run.py b/examples/candle_chart/run.py index 1059fe6c..c4114cb9 100644 --- a/examples/candle_chart/run.py +++ b/examples/candle_chart/run.py @@ -35,7 +35,7 @@ if __name__ == "__main__": timer = QtCore.QTimer() timer.timeout.connect(update_bar) - # timer.start(100) + timer.start(100) widget.show() app.exec_() diff --git a/vnpy/chart/widget.py b/vnpy/chart/widget.py index 4b1afd19..8ec3a044 100644 --- a/vnpy/chart/widget.py +++ b/vnpy/chart/widget.py @@ -284,6 +284,7 @@ class ChartWidget(pg.PlotWidget): """ self._right_ix = self._manager.get_count() self._update_x_range() + self._cursor.update_info() class ChartCursor(QtCore.QObject):