Skip to content

Columu chart (mergeMode=stacked). I want to customize the colors for stacked bars after every three segments, instead of repeating the colors for every three segments. Is there a way to achieve this? #534

Closed Answered by xiaoyvyv
xiaoyvyv asked this question in Questions
Discussion options

You must be logged in to vote

我知道了

val cartesianLayer =
                binding.chartView.chart?.layers?.firstOrNull() as? ColumnCartesianLayer
            cartesianLayer?.columns = listOf(
                LineComponent(
                    color = Color.BLUE
                ),
                LineComponent(
                    color = Color.RED
                ),
                LineComponent(
                    color = Color.GREEN
                ),
                LineComponent(
                    color = Color.CYAN
                ),
                LineComponent(
                    color = Color.MAGENTA
                )
            )

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@patrickmichalik
Comment options

@xiaoyvyv
Comment options

@patrickmichalik
Comment options

Answer selected by Gowsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants