Simplegraph is Android custom view that can generate graphs similar to the ones you see on coin trading/exchange sites.

If you clone the whole project, main app is a sample app that you can run and see simplegraph functionality in action.

Why this library is out there? Well, I've spent too much time looking for library that does only one thing, and that is, creates graph for simple representation of values over time. Sure, there are already some nice libraries out there that can do the job, but I needed something super simple and tiny. And that is why I had to create "Simplegraph". And now, if anyone needs same functionality in their projects, here it is.

Usage is as simple as posible. View takes series of float numbers (Y axis points) and draws the graph. X-axis point values are not needed since library uses same spacing between each consecutive point.

Sample Usage

To use view in your own project simply use linegraph view in your project, like:


There are two properties you can use in the view. Their names are self-explanatory:

  • lineThickness
  • lineColor

and then in your code you can do something like this:

        val lineGraph = findViewById<LineGraph>(
        val series = arrayOf(0f, 1f, 2f, 8f, 5f, 13f, 4f, 3f, 0f)

To use simplegraph in your projects add dependency in app's build.gradle file

dependencies {
    implementation 'com.bandiago.libs:simplegraph:0.0.2'

Example of use


Screenshot is taken from the app: "Tokenizer Wallet" by Bandiago. You can find it on Play Store and if you are into crypto it's worth checking out.