From 514bbb1a980a6b0b5209ba4c1f0f054026ec5744 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 6 Apr 2022 12:13:05 -0400 Subject: [PATCH] Loop for first graphic with xvec --- piker/ui/_interaction.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index 069ab3e9..6a833b1f 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -869,10 +869,10 @@ class ChartView(ViewBox): if not graphics: return 0 - graphic = graphics[0] - xvec = graphic.pixelVectors()[0] - if xvec: - return xvec.x() + for graphic in graphics: + xvec = graphic.pixelVectors()[0] + if xvec: + return xvec.x() else: return 0