From 870cd976c99f2df7b249c4c8674634acf1ca1fd5 Mon Sep 17 00:00:00 2001 From: wangyiqian Date: Thu, 15 Apr 2021 11:10:54 +0800 Subject: [PATCH] Fix bug of getYValueRange when change the KChart index --- .../github/wangyiqian/stockchart/childchart/kchart/KChart.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/com/github/wangyiqian/stockchart/childchart/kchart/KChart.kt b/lib/src/main/java/com/github/wangyiqian/stockchart/childchart/kchart/KChart.kt index 7554876..4170a62 100644 --- a/lib/src/main/java/com/github/wangyiqian/stockchart/childchart/kchart/KChart.kt +++ b/lib/src/main/java/com/github/wangyiqian/stockchart/childchart/kchart/KChart.kt @@ -107,7 +107,7 @@ open class KChart( override fun getYValueRange(startIndex: Int, endIndex: Int, result: FloatArray) { - if (chartConfig.index != null && chartConfig.index != lastCalculateIndexType) { + if (chartConfig.index == null || chartConfig.index != lastCalculateIndexType) { calculateIndexList() }