From 8d15ad2dfafe4b48ac0c54eecf690b408a0c1451 Mon Sep 17 00:00:00 2001 From: Pavel Chervakov Date: Wed, 20 Nov 2024 14:26:17 +0100 Subject: [PATCH] Fix endless update loop in the presence of empty DataSet (#674) --- .../io/fair_acc/chartfx/renderer/spi/AbstractRendererXY.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chartfx-chart/src/main/java/io/fair_acc/chartfx/renderer/spi/AbstractRendererXY.java b/chartfx-chart/src/main/java/io/fair_acc/chartfx/renderer/spi/AbstractRendererXY.java index e97708167..6a3a7fad0 100644 --- a/chartfx-chart/src/main/java/io/fair_acc/chartfx/renderer/spi/AbstractRendererXY.java +++ b/chartfx-chart/src/main/java/io/fair_acc/chartfx/renderer/spi/AbstractRendererXY.java @@ -122,6 +122,8 @@ protected void updateAxisRange(AxisRange range, int dim) { } protected void updateAxisRange(DataSet dataSet, AxisRange range, int dim) { + if (dataSet.getDataCount() == 0) + return; var dsRange = dataSet.getAxisDescription(dim); if (!dsRange.isDefined()) { dataSet.recomputeLimits(dim);