AppDevNext / AndroidChart

A fork from dead upstream with a lot of merged pull requests from upstream. Including Espresso tests and screenshot tests
Other
112 stars 16 forks source link

specificPositions not working in the HorizontalBarChart #295

Open jihoon4372 opened 1 month ago

jihoon4372 commented 1 month ago

I tried to use specificPositions in the HorizontalBarChart, but it does not work. it works in the BarChart but it does not work in the HorizontalBarChart.

the code I used is

val hyAxis = hChart.axisLeft    
hyAxis.removeAllLimitLines()
hyAxis.axisLineColor = Color.TRANSPARENT
hyAxis.gridColor = Color.TRANSPARENT
hyAxis.textColor = Color.BLACK
if(range!=0f){
    hyAxis.axisMaximum = range * 5
}else{
    hyAxis.axisMaximum = wMaximum * 5
}
hyAxis.axisMinimum = 0f
hyAxis.setDrawGridLines(false)
hyAxis.isEnabled = true
hyAxis.isShowSpecificPositions = true
hyAxis.specificPositions = floatArrayOf(300000f)

Could someone tell me if i wrote the code something wrong, so then I'll fix my codes with great appreciation