Skip to content

Commit 7c3f0d4

Browse files
authored
Merge pull request #617 from AppDevNext/Cosmetic
Cosmetic
2 parents 7dc3b14 + 3bd4e09 commit 7c3f0d4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,13 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec
129129
// add data
130130
binding.seekBarX.progress = 45
131131
binding.seekBarY.progress = 180
132-
Timber.d("count=45 range=180f")
133132
setData(this, binding.chart1, 45, 180f)
134133

135134
// draw points over time
136135
binding.chart1.animateX(1500)
137136

138137
// get the legend (only possible after setting data)
139-
val legend = binding.chart1.legend
140-
legend.form = LegendForm.LINE
138+
binding.chart1.legend.form = LegendForm.LINE
141139
}
142140

143141
override fun onCreateOptionsMenu(menu: Menu): Boolean {

app/src/main/kotlin/info/appdev/chartexample/LineChartActivityColored.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class LineChartActivityColored : DemoBase() {
9595
chart.animateX(2500)
9696
}
9797

98+
@Suppress("SameParameterValue")
9899
private fun getData(range: Float): LineData {
99100
val count = 36
100101
val values = ArrayList<Entry>()

chartLib/src/main/kotlin/info/appdev/charting/renderer/LineChartRenderer.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,11 @@ open class LineChartRenderer(
491491

492492
val trans = dataProvider.getTransformer(dataSet.axisDependency)
493493

494-
// make sure the values do not interfear with the circles
494+
// make sure the values do not interfere with the circles
495495
var valOffset = (dataSet.circleRadius * 1.75f).toInt()
496496

497-
if (!dataSet.isDrawCirclesEnabled) valOffset = valOffset / 2
497+
if (!dataSet.isDrawCirclesEnabled)
498+
valOffset /= 2
498499

499500
xBounds.set(dataProvider, dataSet)
500501

@@ -534,7 +535,7 @@ open class LineChartRenderer(
534535

535536
icon?.let {
536537
canvas.drawImage(
537-
it,
538+
icon,
538539
(x + iconsOffset.x).toInt(),
539540
(y + iconsOffset.y).toInt()
540541
)

0 commit comments

Comments
 (0)