Skip to content

Commit 917d482

Browse files
committed
Logging
1 parent 23ea0ec commit 917d482

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/BarChartRenderer.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.github.mikephil.charting.utils.MPPointF
1414
import com.github.mikephil.charting.utils.Transformer
1515
import com.github.mikephil.charting.utils.Utils
1616
import com.github.mikephil.charting.utils.ViewPortHandler
17+
import timber.log.Timber
1718
import kotlin.math.ceil
1819
import kotlin.math.min
1920

@@ -60,6 +61,7 @@ open class BarChartRenderer(
6061
barBuffers = mutableListOf()
6162

6263
barData.dataSets.forEach {
64+
Timber.d("$i ${barBuffers!!.size}")
6365
barBuffers.add(
6466
BarBuffer(
6567
it.entryCount * 4 * (if (it.isStacked) it.stackSize else 1),
@@ -78,7 +80,7 @@ open class BarChartRenderer(
7880

7981
for (i in 0..<barData.dataSetCount) {
8082
val set = barData.getDataSetByIndex(i)
81-
83+
Timber.d("$i ${barData.dataSetCount} ${set.isVisible}")
8284
if (set.isVisible) {
8385
drawDataSet(c, set, i)
8486
}
@@ -112,6 +114,7 @@ open class BarChartRenderer(
112114
val phaseX = animator.phaseX
113115
val phaseY = animator.phaseY
114116

117+
Timber.d("shadow=${chart.isDrawBarShadowEnabled}")
115118
// draw the bar shadow before the values
116119
if (chart.isDrawBarShadowEnabled) {
117120
shadowPaint.color = dataSet.barShadowColor
@@ -125,6 +128,7 @@ open class BarChartRenderer(
125128
var i = 0
126129
val count = min((ceil(((dataSet.entryCount).toFloat() * phaseX).toDouble())).toInt().toDouble(), dataSet.entryCount.toDouble()).toInt()
127130
while (i < count) {
131+
Timber.d("$i")
128132
val e = dataSet.getEntryForIndex(i)
129133

130134
x = e.x

0 commit comments

Comments
 (0)