https://github.com/abbasnaqdi/chainchart
Chain (Line) Chart library for Android
https://github.com/abbasnaqdi/chainchart
android-chart android-charts android-library chain-chart chart chart-library charts line-char line-charts
Last synced: 9 months ago
JSON representation
Chain (Line) Chart library for Android
- Host: GitHub
- URL: https://github.com/abbasnaqdi/chainchart
- Owner: abbasnaqdi
- License: mit
- Created: 2020-10-18T17:36:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-29T00:30:18.000Z (over 4 years ago)
- Last Synced: 2025-05-13T00:48:31.289Z (9 months ago)
- Topics: android-chart, android-charts, android-library, chain-chart, chart, chart-library, charts, line-char, line-charts
- Language: Kotlin
- Homepage:
- Size: 199 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
##### `Chain Chart`
[](https://jitpack.io/#oky2abbas/chain-chart)
[](https://github.com/oky2abbas/chain-chart)
[](https://github.com/oky2abbas/chain-chart)
**Chain Chart** is a library for displaying chain and line charts, the idea of this library came to my mind from Google Analytics.**
[](https://idpay.ir/oky2abbas) **BTC**: `1HPZyUP9EJZi2S87QrvCDrE47qRV4i5Fze`
[](https://idpay.ir/oky2abbas) **ETH or USDT**: `0x4a4b0A26Eb31e9152653E4C08bCF10f04a0A02a9`

##### Getting Started :
Add to your root build.gradle :
```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
Add the dependency :
```groovy
dependencies {
implementation 'com.github.oky2abbas:chainChart:v0+'
}
```
##### Simple API (default) :
In `XML` :
```xml
```
In `Code` :
```java
val intervalList = listOf("Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
val rangeList = listOf("0-1K", "100K", "200K", "500K")
val lineList = arrayListOf().apply {
add(Line("Line 1", Color.BLUE, listOf(10f, 280f, 88f, 70f, 23f, 33f)))
add(Line("Line 2", Color.RED, listOf(300f, 40f, 38f, 180f, 403f, 201f)))
}
chainChartView.setData(lineList, intervalList, rangeList)
```
##### Customazation :
```xml
app:cc_line_size="3dp" //size as dp
app:cc_node_size="3dp" //size as dp
app:cc_text_size="11sp" //size as sp
app:cc_text_color="#000000" //color as int or resource id
app:cc_font_family="@font/font_name" //font as resource id
```
In `Code` :
```java
chainChartView.apply{
setLineSize(3f) // size as dp
setNodeSize(8F) //size as dp
setTextSize(11f) // size as sp
setTextColor(Color.GRAY) //color as int
setFontFamily(font_family) //font as typeface
}
```