Вы можете переопределить AxisRenderer.drawGridLine и изменить ширину линии сетки.
private class CustomXAxisRenderer(
viewPortHandler: ViewPortHandler,
xAxis: XAxis,
trans: Transformer
) : XAxisRenderer(viewPortHandler, xAxis, trans) {
override fun drawGridLine(c: Canvas?, x: Float, y: Float, gridLinePath: Path?) {
mGridPaint.strokeWidth = (if (x.toInt() % 5 == 0) 2 else 1).toFloat()
super.drawGridLine(c, x, y, gridLinePath)
}
}
...
chart.setXAxisRenderer(CustomXAxisRenderer(mViewPortHandler, mXAxis, mLeftAxisTransformer))