https://github.com/erenalpaslan/chartcore
Data visualization library 📊 for Android. Based on Chart.js javascript library which is currently the most popular library for web development. Extremely customizable, supports pie, doughnut, line, bar, radar, area, bubble, scatter and mixed types.
https://github.com/erenalpaslan/chartcore
android android-library bar-chart chart chart-library chartjs graphics kotlin line-chart pie-chart visualization webview
Last synced: 17 days ago
JSON representation
Data visualization library 📊 for Android. Based on Chart.js javascript library which is currently the most popular library for web development. Extremely customizable, supports pie, doughnut, line, bar, radar, area, bubble, scatter and mixed types.
- Host: GitHub
- URL: https://github.com/erenalpaslan/chartcore
- Owner: erenalpaslan
- License: apache-2.0
- Created: 2022-11-27T12:50:33.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-22T14:42:55.000Z (about 2 years ago)
- Last Synced: 2025-04-12T08:53:39.548Z (17 days ago)
- Topics: android, android-library, bar-chart, chart, chart-library, chartjs, graphics, kotlin, line-chart, pie-chart, visualization, webview
- Language: Kotlin
- Homepage:
- Size: 247 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/ErenAlpaslan/ChartCore/actions/workflows/maven-publish.yml)
## ChartCore
Data visualization library 📊 for Android. Based on Chart.js javascript library which is currently the most popular library for web development. Extremely customizable, supports pie, doughnut, line, bar, radar, area, bubble, scatter and mixed types.***
## Features1. Support `Android`、`Kotlin` & `Java`.
2. Supports pie, doughnut, line, bar, radar, area, bubble, scatter and mixed types of chart
3. Interactive、animated, the `animation` effect is exquisite 、delicate、 smooth and beautiful.[Underdevelopment]
4. Support `chain programming syntax` like system framework.***
## Installation
[](https://jitpack.io/#ErenAlpaslan/ChartCore)### Gradle
#### Step 1. Add the JitPack repository to your build fileAdd it in your root build.gradle at the end of repositories:
```groovy
allprojects {
repositories {
...
maven { url 'https://www.jitpack.io' }
}
}
```
#### Step 2. Add the dependency```groovy
dependencies {
implementation 'com.github.ErenAlpaslan:ChartCore:1.0.0'
}
```## Usage
1. Create the instance object of chart view:`ChartCoreView`
```xml
```
2. Configure the properties of chart model:`ChartCoreModel`
```kotlin
val data = mapOf(
"2019" to 60.0,
"2020" to 50.0,
"2021" to 40.0,
"2022" to 120.0,
"2023" to 10.0
)val coreData = ChartData()
.addDataset(
ChartNumberDataset()
.data(data.values.toList())
.label("Acquisitions by year")
.offset(10)
)
.labels(data.keys.toList())val chartOptions = ChartOptions()
.plugin(
Plugin()
.subtitle(
Title()
.display(true)
.text("Subtitle example")
.position(Position.BOTTOM)
).title(
Title()
.display(true)
.text("Title")
.position(Position.TOP)
.align(TextAlign.CENTER)
.color("red")
)
.tooltip(
Tooltip(false)
)
)
.elements(
Elements()
.line(
Line()
.tension(0.5f)
)
)val chartModel = ChartCoreModel()
.type(ChartTypes.LINE)
.data(coreData)
.options(chartOptions)
```
3. And you need to set core model to view:```kotlin
binding.chartCore.draw(chartModel)
```4. 🚀 And thats it.
## LICENSE
ChartCore is available under the Apache license. See the [LICENSE](https://github.com/ErenAlpaslan/ChartCore/blob/master/LICENSE) file for more information.