From 3f5b4c2f5c1a0cc8d28cc4d4bc8fcfef891e7544 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Fri, 26 Dec 2025 23:47:43 +0100 Subject: [PATCH] Remove deprecations --- .../info/appdev/charting/data/BarDataSet.kt | 6 +----- .../info/appdev/charting/data/LineDataSet.kt | 15 ++------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/chartLib/src/main/kotlin/info/appdev/charting/data/BarDataSet.kt b/chartLib/src/main/kotlin/info/appdev/charting/data/BarDataSet.kt index 4effeab5c..1f566ab8f 100644 --- a/chartLib/src/main/kotlin/info/appdev/charting/data/BarDataSet.kt +++ b/chartLib/src/main/kotlin/info/appdev/charting/data/BarDataSet.kt @@ -45,11 +45,7 @@ open class BarDataSet(yVals: MutableList, label: String) : BarLineScat */ private var mStackLabels: MutableList = mutableListOf() - /** - * This method is deprecated. - * Use getFills() instead. - */ - @get:Deprecated("") + @get:Deprecated("Use getFills() instead") var gradients: MutableList = mutableListOf() protected set diff --git a/chartLib/src/main/kotlin/info/appdev/charting/data/LineDataSet.kt b/chartLib/src/main/kotlin/info/appdev/charting/data/LineDataSet.kt index f1496d782..a2833919d 100644 --- a/chartLib/src/main/kotlin/info/appdev/charting/data/LineDataSet.kt +++ b/chartLib/src/main/kotlin/info/appdev/charting/data/LineDataSet.kt @@ -3,6 +3,7 @@ package info.appdev.charting.data import android.content.Context import android.graphics.Color import android.graphics.DashPathEffect +import androidx.core.content.ContextCompat import info.appdev.charting.formatter.DefaultFillFormatter import info.appdev.charting.formatter.IFillFormatter import info.appdev.charting.interfaces.datasets.ILineDataSet @@ -109,18 +110,6 @@ open class LineDataSet(yVals: MutableList?, label: String = "") : LineRad lineDataSet.mLineDataSetMode = mLineDataSetMode } - @get:Deprecated("Deprecated because of unclarity. Use getCircleRadius instead") - @set:Deprecated("Deprecated because of unclarity. Use getCircleRadius instead") - var circleSize: Float - get() = circleRadius - /** - * sets the size (radius) of the circle shpaed value indicators, - * default size = 4f - */ - set(size) { - circleRadius = size - } - /** * Enables the line to be drawn in dashed mode, e.g. like this * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF. @@ -275,7 +264,7 @@ open class LineDataSet(yVals: MutableList?, label: String = "") : LineRad clrs.clear() for (color in colors) { - clrs.add(context.resources.getColor(color)) + clrs.add(ContextCompat.getColor(context, color)) } this.circleColors = clrs