https://github.com/anhmiuhv/android_realtime_graph_view
An small android module to display a data stream in realtime
https://github.com/anhmiuhv/android_realtime_graph_view
android data-stream data-visualization graph realtime
Last synced: 10 months ago
JSON representation
An small android module to display a data stream in realtime
- Host: GitHub
- URL: https://github.com/anhmiuhv/android_realtime_graph_view
- Owner: anhmiuhv
- Created: 2017-08-14T09:36:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T03:33:54.000Z (over 5 years ago)
- Last Synced: 2025-02-09T13:44:54.756Z (about 1 year ago)
- Topics: android, data-stream, data-visualization, graph, realtime
- Language: Kotlin
- Homepage:
- Size: 2.04 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Android Realtime Graph View
v0.2.0
This is a android view to display a data graph from a data stream in realtime.
Sample project is in folder [app](./app)
## Install
To get a Git project into your build:
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.anhmiuhv:android_realtime_graph_view:Tag'
}
## How to use:
```kotlin
val view = //...RealtimeFunctionView
val manager = view.manager
manager.addPoint(12f)
manager.addPoint(10f)
manager.addPoint(-4f)
manager.addPoint(12f)
```
### Customizable attributes:
```html
```
## Advanced:
### Custom Interpolator
```kotlin
manager.interpolator = Interpolator.Cosine()
//... or
manager.interpolator = Interpolator.Linear()
```
### Add the amount of time to get to the data value
```kotlin
manager.addPoint(12f, 200) //Take 200 ms to get to this value, default = 1000ms
```
### Misc
```kotlin
view.scrollRate = 50f //change scroll rate, higher is faster
view.refreshRate = 20f // each data point correspond to 20 ms
```