We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using a LineChart, the x and y-axis labels aren't legible on dark mode since they are in black color. The axis config colors aren't applied to them.
LineChart
LineChart( lineData = minutesReadData, color = MaterialTheme.colors.primaryVariant, modifier = modifier .height(250.dp) .fillMaxWidth() .padding(vertical = 32.dp, horizontal = 32.dp), axisConfig = AxisConfig( showAxis = true, isAxisDashed = false, showUnitLabels = true, showXLabels = true, xAxisColor = Color.White, yAxisColor = Color.White, ), )
On Light Mode:
On Dark Mode:
The text was updated successfully, but these errors were encountered:
Hey this is something I have planned for future releases but right now I am focusing more on making this library stable.. but will keep this in mind!
Sorry, something went wrong.
Late addition:
As a workaround, I forked the lib and obtained the onSurface color in the LineChart composable:
onSurface
val labelColor = MaterialTheme.colors.onSurface yAxis(... labelColor = labelColor)
Then, added a color param to DrawScope.yAxis and DrawScope.drawXLabel which is then consumed during paint object init:
DrawScope.yAxis
DrawScope.drawXLabel
fun draw...(..., labelColor: Color = Color.Black) { // ... Paint().apply { // ... color = labelColor.toArgb() } }
Now,
Hey, I have these fixed, Will be putting a new release soon!
This will be fixed in the next release
hi-manshu
No branches or pull requests
Using a
LineChart
, the x and y-axis labels aren't legible on dark mode since they are in black color. The axis config colors aren't applied to them.On Light Mode:
On Dark Mode:
The text was updated successfully, but these errors were encountered: