gtcompscientist / KelloCharts

Kotlin Charts/graphs library for Android compatible with API 21+, several chart types with support for scaling, scrolling and animations
Apache License 2.0
50 stars 6 forks source link

Change Axis line color and text color #11

Open YangXuTinkLabs opened 5 years ago

YangXuTinkLabs commented 5 years ago

Hi there, this a good chart lib at first, thanks man. here is a question I met: is there any way to change axis lineColor and textColor without changing the chartData ? for example: I tried chartView.lineChartData.axisXBottom.lineColor = Color.BLACK but it doesn't work and I tried

chartView.lineChartData = chartView.lineChartData.apply {
                    axisXBottom = axisXBottom?.apply {
                        lineColor = Color.BLACK
                        textColor = Color.BLACK
                    }
}

it works but because my chart is drawing in real-time, so every time I use this block to change the color, the axis will auto generator its values which lead to the changing of the viewport (chart's size will change)

any suggestion?