@@ -12,7 +12,6 @@ import android.graphics.RectF
1212import android.graphics.Typeface
1313import android.text.TextUtils
1414import android.util.AttributeSet
15- import android.util.Log
1615import android.view.View
1716import android.view.ViewGroup
1817import android.view.accessibility.AccessibilityEvent
@@ -45,6 +44,7 @@ import com.github.mikephil.charting.utils.ViewPortHandler
4544import com.github.mikephil.charting.utils.convertDpToPixel
4645import com.github.mikephil.charting.utils.getDecimals
4746import com.github.mikephil.charting.utils.initUtils
47+ import timber.log.Timber
4848import kotlin.math.abs
4949import kotlin.math.max
5050
@@ -274,7 +274,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
274274 mInfoPaint!! .textSize = 12f .convertDpToPixel()
275275
276276 if (this .isLogEnabled) {
277- Log .i(" " , " Chart.init()" )
277+ Timber .i(" Chart.init()" )
278278
279279 // enable being detected by ScreenReader
280280 setFocusable(true )
@@ -339,7 +339,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
339339 notifyDataSetChanged()
340340
341341 if (this .isLogEnabled) {
342- Log .i(LOG_TAG , " Data is set." )
342+ Timber .i(" Data is set." )
343343 }
344344 }
345345
@@ -649,7 +649,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
649649 this .highlighted = null
650650 } else {
651651 if (this .isLogEnabled) {
652- Log .i(LOG_TAG , " Highlighted: $high " )
652+ Timber .i(" Highlighted: $high " )
653653 }
654654
655655 entry = mData!! .getEntryForHighlight(high)
@@ -685,7 +685,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
685685 */
686686 open fun getHighlightByTouchPoint (x : Float , y : Float ): Highlight ? {
687687 if (mData == null ) {
688- Log .e(LOG_TAG , " Can't select by touch. No data set." )
688+ Timber .e(" Can't select by touch. No data set." )
689689 return null
690690 } else {
691691 return this .highlighter!! .getHighlight(x, y)
@@ -1292,17 +1292,17 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
12921292
12931293 override fun onSizeChanged (w : Int , h : Int , oldw : Int , oldh : Int ) {
12941294 if (this .isLogEnabled) {
1295- Log .i(LOG_TAG , " OnSizeChanged()" )
1295+ Timber .i(" OnSizeChanged()" )
12961296 }
12971297
12981298 if (w > 0 && h > 0 && w < 10000 && h < 10000 ) {
12991299 if (this .isLogEnabled) {
1300- Log .i(LOG_TAG , " Setting chart dimens, width: $w , height: $h " )
1300+ Timber .i(" Setting chart dimens, width: $w , height: $h " )
13011301 }
13021302 viewPortHandler.setChartDimens(w.toFloat(), h.toFloat())
13031303 } else {
13041304 if (this .isLogEnabled) {
1305- Log .w(LOG_TAG , " *Avoiding* setting chart dimens! width: $w , height: $h " )
1305+ Timber .w(" *Avoiding* setting chart dimens! width: $w , height: $h " )
13061306 }
13071307 }
13081308
@@ -1334,7 +1334,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
13341334 override fun onDetachedFromWindow () {
13351335 super .onDetachedFromWindow()
13361336
1337- // Log .i(LOG_TAG, "Detaching...");
1337+ // Timber .i("Detaching...");
13381338 if (mUnbind) {
13391339 unbindDrawables(this )
13401340 }
@@ -1380,7 +1380,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
13801380
13811381 override fun dispatchPopulateAccessibilityEvent (event : AccessibilityEvent ): Boolean {
13821382 val completed = super .dispatchPopulateAccessibilityEvent(event)
1383- Log .d(LOG_TAG , " Dispatch called for Chart <View> and completed as $completed " )
1383+ Timber .d(" Dispatch called for Chart <View> and completed as $completed " )
13841384
13851385 event.text.add(this .accessibilityDescription)
13861386
@@ -1393,8 +1393,6 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>?> : ViewGroup, IBase
13931393 } // endregion
13941394
13951395 companion object {
1396- const val LOG_TAG : String = " AndroidChart"
1397-
13981396 /* *
13991397 * paint for the grid background (only line and barchart)
14001398 */
0 commit comments