I need to display wind direction readings as arrows, original bmp is an arrow that is rotated to be 0° (pointing upwards), i have a for loop in which i can retrieve degrees from database and i can set drawable to my mpandroidchart but i need to rotate that drawable.
 val jsonTemperatureData = JSONArray(result?.get(0))
 for (i in 0 until jsonTemperatureData.length()) {
     val item = jsonTemperatureData.getJSONObject(i)
     val reading_temperature = item.getString("reading_windspeed")
     val degrees= item.getString("degrees")
     yVals.add(Entry(hour.toFloat(), reading_temperature.toFloat(), ContextCompat.getDrawable(getApplicationContext(),R.drawable.direc)))
 }
How would i set float value from val degrees= item.getString("degrees") to R.drawable.direc inside this loop?
 
     
     
    