Home > Mobile >  MpAndroidChart 3.1.0 Y data into an array of problems
MpAndroidChart 3.1.0 Y data into an array of problems

Time:10-09

MpAndroidChart 3.1.0 when using array as Y data Entry (I, dataY [I]) assignment there is no problem, but the runtime immediately flash back, have brothers know solution, would you please explain, when actual use, usually put the data in an array or a LIST, more in the Map,

CodePudding user response:

 
Val yCharDatas=ArrayList ()//server access Y data
Val yValues=ArrayList ()//MPChart required Y data format list

For (I in 0 until yCharDatas. Size) {
YValues. Add (Entry (i.t oFloat (), yCharDatas [I]))
}


Kotlin wrote
  • Related