Skip to content

Commit b9d5da7

Browse files
committed
Rename
1 parent e93c27a commit b9d5da7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,19 @@ class FilledLineActivity : DemoBase() {
6969

7070
private fun setData(@Suppress("SameParameterValue") range: Float) {
7171
val count = 100
72-
val values1 = ArrayList<Entry?>()
72+
val valuesArray1 = ArrayList<Entry?>()
7373
val sampleValues = getValues(count + 2)
7474

7575
for (i in 0..<count) {
76-
val `val` = (sampleValues[i]!!.toFloat() * range) + 50
77-
values1.add(Entry(i.toFloat(), `val`))
76+
val valueY = (sampleValues[i]!!.toFloat() * range) + 50
77+
valuesArray1.add(Entry(i.toFloat(), valueY))
7878
}
7979

80-
val values2 = ArrayList<Entry?>()
80+
val valuesArray2 = ArrayList<Entry?>()
8181

8282
for (i in 0..<count) {
83-
val `val` = (sampleValues[i + 1]!!.toFloat() * range) + 450
84-
values2.add(Entry(i.toFloat(), `val`))
83+
val valueY = (sampleValues[i + 1]!!.toFloat() * range) + 450
84+
valuesArray2.add(Entry(i.toFloat(), valueY))
8585
}
8686

8787
val set1: LineDataSet
@@ -92,13 +92,13 @@ class FilledLineActivity : DemoBase() {
9292
) {
9393
set1 = binding.chart1.data!!.getDataSetByIndex(0) as LineDataSet
9494
set2 = binding.chart1.data!!.getDataSetByIndex(1) as LineDataSet
95-
set1.setEntries(values1)
96-
set2.setEntries(values2)
95+
set1.setEntries(valuesArray1)
96+
set2.setEntries(valuesArray2)
9797
binding.chart1.data!!.notifyDataChanged()
9898
binding.chart1.notifyDataSetChanged()
9999
} else {
100100
// create a dataset and give it a type
101-
set1 = LineDataSet(values1, "DataSet 1")
101+
set1 = LineDataSet(valuesArray1, "DataSet 1")
102102

103103
set1.axisDependency = YAxis.AxisDependency.LEFT
104104
set1.setColor(Color.rgb(255, 241, 46))
@@ -119,7 +119,7 @@ class FilledLineActivity : DemoBase() {
119119
}
120120

121121
// create a dataset and give it a type
122-
set2 = LineDataSet(values2, "DataSet 2")
122+
set2 = LineDataSet(valuesArray2, "DataSet 2")
123123
set2.axisDependency = YAxis.AxisDependency.LEFT
124124
set2.setColor(Color.rgb(255, 241, 46))
125125
set2.setDrawCircles(false)

0 commit comments

Comments
 (0)