jaikeerthick / Composable-Graphs

✨ A very Minimal, Sleek and Powerful Graph library for Android built with Kotlin & Jetpack Compose
Apache License 2.0
185 stars 13 forks source link

[bug] Biggest Value in graph being a decimal goes off the graph #40

Open RamziJabali opened 3 months ago

RamziJabali commented 3 months ago

Describe the bug When your largest number in the line graph contains a decimal and is not a whole number, it goes above the graph.

To Reproduce Steps to reproduce the behavior:

  1. Create a LineGraph composable
  2. Give it's biggest point on the graph a decimal value
  3. look at graph

Example data to replicate issue:

listOf(
        LineData(x = "Mon", y = 0),
        LineData(x = "Tues", y = 0),
        LineData(x = "Wed", y = 0),
        LineData(x = "Thurs", y = 0),
        LineData(x = "Fri", y = 2.59999999),
        LineData(x = "Sat", y = 0),
        LineData(x = "Sun", y = 0),
    )

Expected behavior To see points within graph

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2024-06-07 at 11 47 40 PM

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.