Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months 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 (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-18T10:41:37.000Z (about 2 years ago)
- Last Synced: 2023-03-05T09:38:07.172Z (almost 2 years ago)
- Topics: android, android-library, bar-chart, chart, chart-library, chartjs, graphics, kotlin, line-chart, pie-chart, visualization, webview
- Language: Kotlin
- Homepage:
- Size: 242 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Android CI](https://github.com/ErenAlpaslan/ChartCore/actions/workflows/maven-publish.yml/badge.svg)](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/v/ErenAlpaslan/ChartCore.svg)](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.