Skip to content

Problem while creating a composed chart #330

Discussion options

You must be logged in to vote

Hello! The fourth chart in the sample app matches the second image. Here’s an example with static data:

val chartEntryModel =
    entryModelOf(entriesOf(1f, 2f, 4f), entriesOf(2f, 1f, 4f), entriesOf(4f, 2f, 1f)) + entryModelOf(1f, 4f, 2f)

@Preview
@Composable
fun Example() {
    val columnChart = columnChart()
    val lineChart = lineChart()
    Chart(
        chart = remember { columnChart + lineChart },
        model = chartEntryModel,
        startAxis = startAxis(),
        bottomAxis = bottomAxis(),
    )
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Aatif-Thinkitive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants