From 6f768750b3f36dd652f8df62e0ec23f73b1a8c53 Mon Sep 17 00:00:00 2001 From: Xuan Liu Date: Fri, 29 Dec 2017 09:49:33 +0800 Subject: [PATCH] Fix axis label disappear when zooming in deep enough --- 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 bd1c6aa466..b587d7b12e 100644 --- a/Source/Charts/Renderers/AxisRendererBase.swift +++ b/Source/Charts/Renderers/AxisRendererBase.swift @@ -163,7 +163,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)