@@ -84,12 +84,12 @@ class FilledLineActivity : DemoBase() {
8484 valuesArray2.add(EntryFloat (i.toFloat(), valueY))
8585 }
8686
87- val set1: LineDataSet
88- val set2: LineDataSet
87+ val set1: LineDataSet < EntryFloat >
88+ val set2: LineDataSet < EntryFloat >
8989
9090 if (binding.chart1.lineData.dataSetCount > 0 ) {
91- set1 = binding.chart1.lineData.getDataSetByIndex(0 ) as LineDataSet
92- set2 = binding.chart1.lineData.getDataSetByIndex(1 ) as LineDataSet
91+ set1 = binding.chart1.lineData.getDataSetByIndex(0 ) as LineDataSet < EntryFloat >
92+ set2 = binding.chart1.lineData.getDataSetByIndex(1 ) as LineDataSet < EntryFloat >
9393 set1.entries = valuesArray1
9494 set2.entries = valuesArray2
9595 binding.chart1.lineData.notifyDataChanged()
@@ -109,7 +109,7 @@ class FilledLineActivity : DemoBase() {
109109 set1.highLightColor = Color .rgb(244 , 117 , 117 )
110110 set1.isDrawCircleHoleEnabled = false
111111 set1.fillFormatter = object : IFillFormatter {
112- override fun getFillLinePosition (dataSet : ILineDataSet ? , dataProvider : LineDataProvider ): Float {
112+ override fun getFillLinePosition (dataSet : ILineDataSet < * > ? , dataProvider : LineDataProvider ): Float {
113113 // change the return value here to better understand the effect
114114 // return 0;
115115 return binding.chart1.axisLeft.axisMinimum
@@ -129,14 +129,14 @@ class FilledLineActivity : DemoBase() {
129129 set2.isDrawCircleHoleEnabled = false
130130 set2.highLightColor = Color .rgb(244 , 117 , 117 )
131131 set2.fillFormatter = object : IFillFormatter {
132- override fun getFillLinePosition (dataSet : ILineDataSet ? , dataProvider : LineDataProvider ): Float {
132+ override fun getFillLinePosition (dataSet : ILineDataSet < * > ? , dataProvider : LineDataProvider ): Float {
133133 // change the return value here to better understand the effect
134134 // return 600;
135135 return binding.chart1.axisLeft.axisMaximum
136136 }
137137 }
138138
139- val dataSets = ArrayList <ILineDataSet >()
139+ val dataSets = ArrayList <ILineDataSet < EntryFloat > >()
140140 dataSets.add(set1) // add the data sets
141141 dataSets.add(set2)
142142
0 commit comments