patrykandpatrick / vico

A light and extensible chart library for Android.
https://patrykandpatrick.com/vico/wiki
Apache License 2.0
2.08k stars 125 forks source link

How to Remove LineCart start end padding #595

Closed YKW93 closed 6 months ago

YKW93 commented 6 months ago

How to reproduce

How to Remove LineCart Start End Value Padding

Below is my code When I use compose vico I get padding? gaps? at the beginning and end and I want to get rid of them, how can I do that?

The result I want is the first image below.

    val list = listOf(
        FloatEntry(0f, 1f),
        FloatEntry(1f, 0f),
        FloatEntry(2f, 1f)
    )
    Chart(
        chart = lineChart(lines = chartLines),
        model = ChartEntryModelProducer(list).requireModel(),
        chartScrollSpec = rememberChartScrollSpec(isScrollEnabled = false),
        modifier = modifier
            .fillMaxWidth()
            .height(102.dp)
    )

Observed behavior

vico library 스크린샷 2024-03-04 오후 3 58 40

Expected behavior

MPAndroidChart 스크린샷 2024-03-04 오후 3 58 51

Vico version(s)

Latest stable version

Android version(s)

14

Additional information

using vico 1.13.1 version