From 26dfe038f14289125e10bca214f345eb6cf17569 Mon Sep 17 00:00:00 2001 From: duyiping Date: Thu, 27 Sep 2018 16:11:43 +0800 Subject: [PATCH] fix issue #3662 --- Source/Charts/Renderers/CandleStickChartRenderer.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Charts/Renderers/CandleStickChartRenderer.swift b/Source/Charts/Renderers/CandleStickChartRenderer.swift index 61d3f65c18..6da78b2b20 100644 --- a/Source/Charts/Renderers/CandleStickChartRenderer.swift +++ b/Source/Charts/Renderers/CandleStickChartRenderer.swift @@ -62,8 +62,7 @@ open class CandleStickChartRenderer: LineScatterCandleRadarRenderer @objc open func drawDataSet(context: CGContext, dataSet: ICandleChartDataSet) { guard - let dataProvider = dataProvider, - let chart = dataProvider as? CandleStickChartView + let dataProvider = dataProvider else { return } let trans = dataProvider.getTransformer(forAxis: dataSet.axisDependency) @@ -257,7 +256,7 @@ open class CandleStickChartRenderer: LineScatterCandleRadarRenderer } let axElement = createAccessibleElement(withIndex: j, - container: chart, + container: dataProvider, dataSet: dataSet) { (element) in element.accessibilityLabel = "\(doesContainMultipleDataSets ? "\(dataSet.label ?? "Dataset")" : "") " + "\(xPos) - \(accessibilityMovementDescription). low: \(low), high: \(high), opening: \(open), closing: \(close)"