From 5a6ad7edd2f82d39cfaeb652097e930f59ccd651 Mon Sep 17 00:00:00 2001 From: Xuan Date: Mon, 8 Jan 2018 09:32:17 +0800 Subject: [PATCH] Fix axis label disappear when zooming in deep enough (#3132) --- Source/Charts/Renderers/AxisRendererBase.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Charts/Renderers/AxisRendererBase.swift b/Source/Charts/Renderers/AxisRendererBase.swift index 14cd25ee4d..15a9206e51 100644 --- a/Source/Charts/Renderers/AxisRendererBase.swift +++ b/Source/Charts/Renderers/AxisRendererBase.swift @@ -164,7 +164,11 @@ open class AxisRendererBase: Renderer n += 1 } } - + else if last == first && n == 0 + { + n = 1 + } + // Ensure stops contains at least n elements. axis.entries.removeAll(keepingCapacity: true) axis.entries.reserveCapacity(labelCount)