一、常用属性
参考地址:https://blog.csdn.net/qq_25943493/article/details/51803497
中文文档:https://github.com/baiqingsong/ChartDawn
bc.setTouchEnabled(false) bc.isDragEnabled = false bc.setScaleEnabled(false)
bc.setDrawGridBackground(false)
bc.axisRight.isEnabled = false bc.axisLeft.axisMinimum = 0f bc.axisLeft.setDrawGridLines(false) bc.axisLeft.axisLineColor = Color.TRANSPARENT
bc.xAxis.position = XAxis.XAxisPosition.BOTTOM bc.xAxis.setDrawGridLines(false)
bc.xAxis.setLabelCount(10, false)
bc.extraBottomOffset = 14f
bc.description = Description().apply { text = "min" setPosition(30.toPx().toFloat(), 25.toPx().toFloat()) textAlign = Paint.Align.LEFT }
val legend = bc.legend legend.horizontalAlignment = Legend.LegendHorizontalAlignment.CENTER legend.verticalAlignment = Legend.LegendVerticalAlignment.TOP
bc.setDrawBarShadow(false) bc.isHighlightFullBarEnabled = false
bc.setDrawBorders(false) bc.setPadding(1, 1, 1, 1)
bc.description = Description().apply { text = "" }
|