Giter Site home page Giter Site logo

androidchartjs's Introduction

AndroidChartJS

image

Simplify chart visualization in your Android applications by seamlessly integrating the robust capabilities of Chart.js. Create interactive and visually compelling charts effortlessly, enhancing your data presentation on the Android platform.

Installation

Use Gradle. Add it in your settings.gradle at the end of repositories:

dependencyResolutionManagement {
    repositories {
        ....
        maven { url 'https://jitpack.io' }
    }
}

then, add the dependecy in your build.gradle file (Module)

dependencies {
    implementation 'com.github.SeptiawanAjiP:AndroidChartJS:Tag'
}

replace Tag with the latest version.

Usage

XML Layout

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
   <com.dewakoding.androidchartjs.AndroidChartJSView
       android:id="@+id/android_chart_1"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       app:layout_constraintLeft_toLeftOf="parent"
       app:layout_constraintRight_toRightOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

Activity

binding.androidChart1.setChart(
            ChartType.PIE,
            arrayOf("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday"),
            arrayOf(10, 3, 5, 8, 9),
            "of quantity")

// set bubble chart
 binding.androidChart1.setBubbleChart(
            arrayOf(
                BubbleEntity(10,20,30),
                BubbleEntity(25, 45, 20),
                BubbleEntity(15, 25, 5)
            ),
            "of quantity")

Chart Types

  • Bar Chart
  • Line Chart
  • Pie Chart
  • Doughnut Chart
  • Polar Area
  • Radar
  • Bubble Chart

androidchartjs's People

Contributors

septiawanajip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.