✨ A very Minimal, Sleek and Powerful Graph library for Android using Jetpack Compose

Overview

Composable-Graphs ( Jetpack Compose )

tag

A very Minimal, Sleek and Lightweight Graph library for Android using Jetpack Compose

Gradle Setup

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

dependencies {
    implementation 'com.github.jaikeerthick:Composable-Graphs:v1.0'
}

Screenshots


Usage

  1. Bar Graph
BarGraph(
  dataList = listOf(20, 30, 10, 60, 35), //  dataList : List<Number>
)
  1. Line Graph
LineGraph(
    xAxisData = listOf("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat").map {
        GraphData.String(it)
    }, // xAxisData : List<GraphData>, and GraphData accepts both Number and String types
    yAxisData = listOf(200, 40, 60, 450, 700, 30, 50),
)

Example for passing String and Number:

xAxisData = listOf("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat").map {
                       GraphData.String(it)
            }

xAxisData = listOf(20, 40, 30, 50, 70, 0, 40).map {
                       GraphData.Number(it)
            }

Note: xAxisData can be of GraphData.String & GraphData.Number, but yAxisData can be only of type Number

Styling

BarGraphStyle and LineGraphStyle can be used to style the Graphs effetively

You can control the following things using Style classes:

  • Height
  • Padding
  • Colors
  • Visibility - control visibility for crosshair, labels, headers, etc.
// BarGraph
val style = BarGraphStyle(
                    visibility = BarGraphVisibility(
                        isYAxisLabelVisible = true
                    )
                )

// LineGraph
val style2 = LineGraphStyle(
                    visibility = LinearGraphVisibility(
                        isHeaderVisible = true,
                        isYAxisLabelVisible = false,
                        isCrossHairVisible = true
                    ),
                    colors = LinearGraphColors(
                        lineColor = GraphAccent2,
                        pointColor = GraphAccent2,
                        clickHighlightColor = PointHighlight2,
                        fillGradient = Brush.verticalGradient(
                            listOf(Gradient3, Gradient2)
                        )
                    )
                )

And you can pass it to the graph like this:

 BarGraph(
    dataList = listOf(20, 30, 10, 60, 35),
    style = style
)   



Contribution:

Fork the repo and create PRs 🦄

You might also like...
Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop.
Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop.

compose-charts Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop. Graph Effects How to use? 1, show Pie Chart in Jetpa

Data2Viz port/wrapper for data visualization with Jetpack Compose
Data2Viz port/wrapper for data visualization with Jetpack Compose

Collage Data2Viz port/wrapper for Jetpack Compose. It is a visualization library, same as Data2Viz and d3. This is obviously not an official Data2Viz

An android compose library with different Graphs and Charts
An android compose library with different Graphs and Charts

plot An android compose library with different Graphs and Charts (currently supports only Line graph, more types will be added soon) Download reposito

Simple Compose Charts for multi-platform. Including Android, Web, Desktop.
Simple Compose Charts for multi-platform. Including Android, Web, Desktop.

compose-charts-desktop Simple Compose Charts for multi-platform. Including Android, Web, Desktop. Compose multiplatform for Android: compose-charts. G

AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.

AnyChart for Android AnyChart Android Charts is an amazing data visualization library for easily creating interactive charts in Android apps. It runs

Android Library to rapidly develop attractive and insightful charts in android applications.
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

Android Library to rapidly develop attractive and insightful charts in android applications.
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

Charts/graphs library for Android compatible with API 8+, several chart types with support for scaling, scrolling and animations
Charts/graphs library for Android compatible with API 8+, several chart types with support for scaling, scrolling and animations

HelloCharts for Android Charting library for Android compatible with API 8+(Android 2.2). Works best when hardware acceleration is available, so API 1

Android library for drawing Pie charts and Donut charts with the ability to customize almost anything in it.
Android library for drawing Pie charts and Donut charts with the ability to customize almost anything in it.

A Pie/Donut*/Ring chart for Android, customizable to the most extent possible. For tutorial and examples refer to the website. build.gradle[.kts] impl

Releases(v1.1)
Owner
Jai Keerthick
Android Developer ✨ | Kotlin + Compose | Building apps with good performance | Learning new stuff continuously 🍃
Jai Keerthick
Android Graph Library for creating zoomable and scrollable line and bar graphs.

Chart and Graph Library for Android Project maintainer wanted! For time reasons I can not continue to maintain GraphView. Contact me if you are intere

Jonas Gehring 2.7k Jan 5, 2023
Android Graph Library for creating zoomable and scrollable line and bar graphs.

Chart and Graph Library for Android Project maintainer wanted! For time reasons I can not continue to maintain GraphView. Contact me if you are intere

Jonas Gehring 2.7k Jan 2, 2023
An Android chart and graph library

EazeGraph EazeGraph is an Android library for creating beautiful and fancy charts. Its main goal was to create a lighweight library which is easy to u

Paul Cech 1.6k Dec 23, 2022
Open-source native Android graph/chart framework includes line chart,stick chart,candlestick chart,pie chart,spider-web chart etc.

Welcome to Android-Charts Welcome to Android-Charts project page on github.com. We just moved from Google Code. Android-Charts is an open-source andro

limc.cn 813 Dec 20, 2022
A powerful 🚀 Android range bar chart library as well as scaling, panning and animations.

RangeBarChart ⚡ Range bar chart library for Android using MPAndroidChart ⚡ There were no charts in MPAndroidChart to show ranges. We were forced to sh

Ted Park 8 Nov 24, 2022
A Powerful Android Charting Library by https://www.numetriclabz.com/

numAndroidCharts A Powerful Android Charting Library by Numetric Technologies Features Core features: [Line Chart](#Line Chart) [Bar Chart](#Bar Chart

shashank jain 88 Nov 29, 2022
Jetpack-linear-chart - A simple way to draw linear chart using Jetpack Compose

jetpack-linear-chart A simple way to draw linear chart using Jetpack Compose We

Bruno Gabriel dos Santos 8 Jan 4, 2023
An open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use

android-compose-charts This is an open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use. Just couples

Mahmoud Ibrahim 17 Dec 31, 2022
An Elementary Chart library for Jetpack Compose

Charty : Elementary Chart library for Compose Chart Library built using Jetpack Compose and is highly customizable. Updates coming soon! Made with ❤️

Himanshu Singh 491 Jan 9, 2023