Skip to content

Commit 339aad3

Browse files
committed
Cosmetic
1 parent 095fb42 commit 339aad3

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec
5656
binding.chart1.setDrawGridBackground(false)
5757

5858
// create marker to display box when values are selected
59-
val mv = MyMarkerView(this, R.layout.custom_marker_view)
59+
val markerView = MyMarkerView(this, R.layout.custom_marker_view)
6060

6161
// Set the marker to the chart
62-
mv.chartView = binding.chart1
63-
binding.chart1.marker.add(mv)
62+
markerView.chartView = binding.chart1
63+
binding.chart1.marker.add(markerView)
6464

6565
// enable scaling and dragging
6666
binding.chart1.isDragEnabled = true
@@ -254,8 +254,8 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec
254254
saveToGallery(binding.chart1, "LineChartActivity1")
255255
}
256256

257-
override fun onStartTrackingTouch(seekBar: SeekBar) {}
258-
override fun onStopTrackingTouch(seekBar: SeekBar) {}
257+
override fun onStartTrackingTouch(seekBar: SeekBar) = Unit
258+
override fun onStopTrackingTouch(seekBar: SeekBar) = Unit
259259
override fun onValueSelected(entry: Entry, highlight: Highlight) {
260260
Timber.i(entry.toString())
261261
Timber.i("LOW HIGH low:${binding.chart1.lowestVisibleX}, high:${binding.chart1.highestVisibleX}")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TimeLineActivity : DemoBase() {
6161

6262
// if disabled, scaling can be done on x- and y-axis separately
6363
binding.chart1.isPinchZoom = false
64-
binding.chart1.setExtraOffsets(0f,0f,0f,24f)
64+
binding.chart1.setExtraOffsets(0f, 0f, 0f, 24f)
6565
binding.chart1.legend.apply {
6666
isEnabled = false
6767
form = LegendForm.LINE

0 commit comments

Comments
 (0)