├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .sample-images ├── guidelines.PNG ├── livechart_sample.png ├── livechart_second_dataset_example_1.PNG ├── livechart_slider.gif ├── livechart_styling_example_1.png └── smooth_path.PNG ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── yabu │ │ └── livechartdemoapp │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── yabu │ │ │ └── livechartdemoapp │ │ │ ├── MainActivity.kt │ │ │ ├── SampleData.kt │ │ │ └── TestDataResponse.kt │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ ├── bools.xml │ │ └── colors.xml │ │ └── values │ │ ├── bools.xml │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── yabu │ └── livechartdemoapp │ └── ExampleUnitTest.kt ├── build.gradle ├── docs ├── -search.html ├── images │ ├── arrow_down.svg │ ├── docs_logo.svg │ ├── logo-icon.svg │ └── logo-text.svg ├── livechart │ ├── com.yabu.livechart.model │ │ ├── -bounds │ │ │ ├── -init-.html │ │ │ ├── component1.html │ │ │ ├── component2.html │ │ │ ├── component3.html │ │ │ ├── component4.html │ │ │ ├── copy.html │ │ │ └── index.html │ │ ├── -data-point │ │ │ ├── -init-.html │ │ │ ├── component1.html │ │ │ ├── component2.html │ │ │ ├── copy.html │ │ │ └── index.html │ │ ├── -dataset │ │ │ ├── -companion │ │ │ │ ├── index.html │ │ │ │ └── new.html │ │ │ ├── -init-.html │ │ │ ├── component1.html │ │ │ ├── copy.html │ │ │ ├── has-data.html │ │ │ ├── index.html │ │ │ ├── lower-bound.html │ │ │ └── upper-bound.html │ │ └── index.html │ ├── com.yabu.livechart.view │ │ ├── -live-chart-style │ │ │ ├── -init-.html │ │ │ └── index.html │ │ ├── -live-chart-touch-overlay │ │ │ ├── -init-.html │ │ │ ├── bind-to-dataset.html │ │ │ ├── draw-y-bounds.html │ │ │ ├── index.html │ │ │ ├── on-touch-event.html │ │ │ ├── set-dataset.html │ │ │ ├── set-live-chart-style.html │ │ │ ├── set-on-touch-callback-listener.html │ │ │ └── set-second-dataset.html │ │ ├── -live-chart-view │ │ │ ├── -init-.html │ │ │ ├── disable-fill.html │ │ │ ├── draw-baseline-conditional-color.html │ │ │ ├── draw-baseline-from-first-point.html │ │ │ ├── draw-baseline.html │ │ │ ├── draw-dataset.html │ │ │ ├── draw-fill.html │ │ │ ├── draw-last-point-label.html │ │ │ ├── draw-y-bounds.html │ │ │ ├── index.html │ │ │ ├── set-baseline-manually.html │ │ │ ├── set-dataset.html │ │ │ ├── set-live-chart-style.html │ │ │ └── set-second-dataset.html │ │ ├── -live-chart │ │ │ ├── -init-.html │ │ │ ├── -on-touch-callback │ │ │ │ ├── index.html │ │ │ │ ├── on-touch-callback.html │ │ │ │ └── on-touch-finished.html │ │ │ ├── disable-fill.html │ │ │ ├── disable-touch-overlay.html │ │ │ ├── draw-baseline-conditional-color.html │ │ │ ├── draw-baseline-from-first-point.html │ │ │ ├── draw-baseline.html │ │ │ ├── draw-dataset.html │ │ │ ├── draw-fill.html │ │ │ ├── draw-last-point-label.html │ │ │ ├── draw-y-bounds.html │ │ │ ├── index.html │ │ │ ├── set-baseline-manually.html │ │ │ ├── set-dataset.html │ │ │ ├── set-live-chart-style.html │ │ │ ├── set-on-touch-callback-listener.html │ │ │ └── set-second-dataset.html │ │ └── index.html │ ├── index.html │ └── package-list ├── navigation.html ├── scripts │ ├── clipboard.js │ ├── main.js │ ├── main.js.map │ ├── navigationLoader.js │ ├── pages.js │ ├── platformContentHandler.js │ ├── scripts.js │ ├── search.js │ └── sourceset_dependencies.js └── styles │ ├── jetbrains-mono.css │ └── style.css ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lint.xml ├── livechart ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── yabu │ │ └── livechart │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── yabu │ │ │ └── livechart │ │ │ ├── model │ │ │ ├── Bounds.kt │ │ │ ├── DataPoint.kt │ │ │ └── Dataset.kt │ │ │ ├── utils │ │ │ ├── EPointF.kt │ │ │ ├── PolyBezierPathUtil.kt │ │ │ └── PublicApi.kt │ │ │ └── view │ │ │ ├── LiveChart.kt │ │ │ ├── LiveChartAttributes.kt │ │ │ ├── LiveChartStyle.kt │ │ │ ├── LiveChartTouchOverlay.kt │ │ │ └── LiveChartView.kt │ └── res │ │ ├── drawable │ │ └── livechart_circle.xml │ │ ├── layout │ │ └── livechart_touch_overlay.xml │ │ └── values │ │ └── attrs.xml │ └── test │ └── java │ └── com │ └── yabu │ └── livechart │ └── ExampleUnitTest.kt └── settings.gradle /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Smartphone (please complete the following information):** 27 | - Device: [e.g. iPhone6] 28 | - OS: [e.g. iOS8.1] 29 | - Browser [e.g. stock browser, safari] 30 | - Version [e.g. 22] 31 | 32 | **Additional context** 33 | Add any other context about the problem here. 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Request a Feature for LiveChart 4 | title: Feature Request 5 | labels: feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Version** 17 | 18 | **Additional context** 19 | Add any other context or screenshots about the feature request here. 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /.idea 4 | /local.properties 5 | /.idea/caches 6 | /.idea/libraries 7 | /.idea/modules.xml 8 | /.idea/workspace.xml 9 | /.idea/navEditor.xml 10 | /.idea/assetWizardSettings.xml 11 | .DS_Store 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | .cxx 16 | -------------------------------------------------------------------------------- /.sample-images/guidelines.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/.sample-images/guidelines.PNG -------------------------------------------------------------------------------- /.sample-images/livechart_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/.sample-images/livechart_sample.png -------------------------------------------------------------------------------- /.sample-images/livechart_second_dataset_example_1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/.sample-images/livechart_second_dataset_example_1.PNG -------------------------------------------------------------------------------- /.sample-images/livechart_slider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/.sample-images/livechart_slider.gif -------------------------------------------------------------------------------- /.sample-images/livechart_styling_example_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/.sample-images/livechart_styling_example_1.png -------------------------------------------------------------------------------- /.sample-images/smooth_path.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/.sample-images/smooth_path.PNG -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Yabu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | 5 | android { 6 | compileSdkVersion 29 7 | buildToolsVersion "29.0.3" 8 | 9 | defaultConfig { 10 | applicationId "com.yabu.livechartdemoapp" 11 | minSdkVersion 21 12 | targetSdkVersion 29 13 | versionCode 1 14 | versionName "1.1" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: "libs", include: ["*.jar"]) 29 | // LiveChart 30 | implementation project(':livechart') 31 | // Gson 32 | implementation 'com.google.code.gson:gson:2.8.6' 33 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 34 | implementation 'androidx.core:core-ktx:1.3.1' 35 | implementation 'androidx.appcompat:appcompat:1.2.0' 36 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 37 | testImplementation 'junit:junit:4.12' 38 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 39 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 40 | 41 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/yabu/livechartdemoapp/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechartdemoapp 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.yabu.livechartdemoapp", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/yabu/livechartdemoapp/TestDataResponse.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechartdemoapp 2 | 3 | class TestDataResponse : ArrayList() 4 | 5 | data class TestDataResponseItem( 6 | val change: Double, 7 | val changeOverTime: Double, 8 | val changePercent: Double, 9 | val close: Double, 10 | val date: String, 11 | val volume: Int 12 | ) -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values-night/bools.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #303030 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/bools.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | #FFF 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LiveChartDemoApp 3 | LiveChart Sample 4 | Positive Livechart Sample 5 | Negative Livechart Sample 6 | Simple Livechart Sample 7 | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/com/yabu/livechartdemoapp/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechartdemoapp 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | ext.kotlin_version = "1.3.72" 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath "com.android.tools.build:gradle:4.0.0" 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' 12 | classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.0-rc") 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } -------------------------------------------------------------------------------- /docs/-search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Search 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 |
15 |
16 |
17 | 18 | 19 | 20 |

Search results for

21 | 22 | 23 |
24 | 30 |
31 |
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /docs/images/arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/images/docs_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/images/logo-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/images/logo-text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-bounds/component1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | component1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

component1

27 |
28 |
29 |
30 | 31 |
32 |
operator fun component1(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-bounds/component2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | component2 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

component2

27 |
28 |
29 |
30 | 31 |
32 |
operator fun component2(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-bounds/component3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | component3 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

component3

27 |
28 |
29 |
30 | 31 |
32 |
operator fun component3(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-bounds/component4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | component4 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

component4

27 |
28 |
29 |
30 | 31 |
32 |
operator fun component4(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-data-point/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <init> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

<init>

27 |
28 |
29 |
30 | 31 |
32 |
fun <init>(x: Float, y: Float) 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-data-point/component1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | component1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

component1

27 |
28 |
29 |
30 | 31 |
32 |
operator fun component1(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-data-point/component2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | component2 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

component2

27 |
28 |
29 |
30 | 31 |
32 |
operator fun component2(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-data-point/copy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | copy 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

copy

27 |
28 |
29 |
30 | 31 |
32 |
fun copy(x: Float, y: Float): DataPoint 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-dataset/-companion/new.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | new 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

new

27 |
28 |
29 |
30 | 31 |
32 |
fun new(): Dataset 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-dataset/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <init> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

<init>

27 |
28 |
29 |
30 | 31 |
32 |
fun <init>(points: MutableList<DataPoint>) 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-dataset/component1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | component1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

component1

27 |
28 |
29 |
30 | 31 |
32 |
operator fun component1(): MutableList<DataPoint> 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-dataset/copy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | copy 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

copy

27 |
28 |
29 |
30 | 31 |
32 |
fun copy(points: MutableList<DataPoint>): Dataset 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-dataset/has-data.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | hasData 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

hasData

27 |
28 |
29 |
30 | 31 |
32 |
fun hasData(): Boolean 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-dataset/lower-bound.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | lowerBound 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

lowerBound

27 |
28 |
29 |
30 | 31 |
32 |
fun lowerBound(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.model/-dataset/upper-bound.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | upperBound 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

upperBound

27 |
28 |
29 |
30 | 31 |
32 |
fun upperBound(): Float 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-style/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <init> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

<init>

27 |
28 |
29 |
30 | 31 |
32 |
fun <init>() 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-touch-overlay/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <init> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

<init>

27 |
28 |
29 |
30 | 31 |
32 |
fun <init>(context: Context, attrs: AttributeSet?) 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-touch-overlay/bind-to-dataset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bindToDataset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

bindToDataset

27 |
28 |
Bind the overlay to the dataset set in this LiveChartTouchOverlay.
29 |
30 | 31 |
32 |
fun bindToDataset() 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-touch-overlay/draw-y-bounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawYBounds 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawYBounds

27 |
28 |
Draw Y bounds flag.
29 |
30 | 31 |
32 |
fun drawYBounds(): LiveChartTouchOverlay 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-touch-overlay/on-touch-event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | onTouchEvent 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

onTouchEvent

27 |
28 |
29 |
30 | 31 |
32 |
open override fun onTouchEvent(event: MotionEvent): Boolean 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-touch-overlay/set-on-touch-callback-listener.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setOnTouchCallbackListener 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

setOnTouchCallbackListener

27 |
28 |
29 |
30 | 31 |
32 |
fun setOnTouchCallbackListener(listener: LiveChart.OnTouchCallback): LiveChartTouchOverlay 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-touch-overlay/set-second-dataset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setSecondDataset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

setSecondDataset

27 |
28 |
Set the Second dataset of this chart.
29 |
30 | 31 |
32 |
fun setSecondDataset(dataset: Dataset): LiveChartTouchOverlay 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/-init-.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <init> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

<init>

27 |
28 |
29 |
30 | 31 |
32 |
fun <init>(context: Context, attrs: AttributeSet?) 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/disable-fill.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | disableFill 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

disableFill

27 |
28 |
Disable Fill flag.
29 |
30 | 31 |
32 |
fun disableFill(): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/draw-baseline-conditional-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawBaselineConditionalColor 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawBaselineConditionalColor

27 |
28 |
Draw baseline flag.
29 |
30 | 31 |
32 |
fun drawBaselineConditionalColor(): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/draw-baseline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawBaseline 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawBaseline

27 |
28 |
Draw baseline flag.
29 |
30 | 31 |
32 |
fun drawBaseline(): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/draw-dataset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawDataset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawDataset

27 |
28 |
Draw the current dataset.
29 |
30 | 31 |
32 |
fun drawDataset(): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/draw-fill.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawFill 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawFill

27 |
28 |
Draw Fill flag.
29 |
30 | 31 |
32 |
fun drawFill(withGradient: Boolean): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/draw-last-point-label.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawLastPointLabel 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawLastPointLabel

27 |
28 |
Draw last point label flag.
29 |
30 | 31 |
32 |
fun drawLastPointLabel(): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/draw-y-bounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawYBounds 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawYBounds

27 |
28 |
Draw Y bounds flag.
29 |
30 | 31 |
32 |
fun drawYBounds(): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart-view/set-dataset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setDataset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

setDataset

27 |
28 |
Set the dataset of this chart.
29 |
30 | 31 |
32 |
fun setDataset(dataset: Dataset): LiveChartView 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/-on-touch-callback/on-touch-callback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | onTouchCallback 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

onTouchCallback

27 |
28 |
29 |
30 | 31 |
32 |
abstract fun onTouchCallback(point: DataPoint) 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/-on-touch-callback/on-touch-finished.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | onTouchFinished 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

onTouchFinished

27 |
28 |
29 |
30 | 31 |
32 |
abstract fun onTouchFinished() 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/disable-fill.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | disableFill 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

disableFill

27 |
28 |
Disable Fill flag.
29 |
30 | 31 |
32 |
fun disableFill(): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/draw-baseline-conditional-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawBaselineConditionalColor 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawBaselineConditionalColor

27 |
28 |
Draw baseline flag.
29 |
30 | 31 |
32 |
fun drawBaselineConditionalColor(): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/draw-baseline-from-first-point.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawBaselineFromFirstPoint 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawBaselineFromFirstPoint

27 |
28 |
Draw baseline automatically from first point.
29 |
30 | 31 |
32 |
fun drawBaselineFromFirstPoint(): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/draw-baseline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawBaseline 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawBaseline

27 |
28 |
Draw baseline flag.
29 |
30 | 31 |
32 |
fun drawBaseline(): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/draw-dataset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawDataset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawDataset

27 |
28 |
Draw on chart and bind overlay to dataset.
29 |
30 | 31 |
32 |
fun drawDataset() 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/draw-fill.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawFill 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawFill

27 |
28 |
Draw Fill flag.
29 |
30 | 31 |
32 |
fun drawFill(withGradient: Boolean): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/draw-last-point-label.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawLastPointLabel 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawLastPointLabel

27 |
28 |
Draw last point label flag.
29 |
30 | 31 |
32 |
fun drawLastPointLabel(): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/draw-y-bounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | drawYBounds 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

drawYBounds

27 |
28 |
Draw Y bounds flag.
29 |
30 | 31 |
32 |
fun drawYBounds(): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/set-dataset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setDataset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

setDataset

27 |
28 |
Set the dataset of this chart.
29 |
30 | 31 |
32 |
fun setDataset(dataset: Dataset): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/com.yabu.livechart.view/-live-chart/set-second-dataset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setSecondDataset 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 |

setSecondDataset

27 |
28 |
Set the Second dataset of this chart.
29 |
30 | 31 |
32 |
fun setSecondDataset(dataset: Dataset): LiveChart 33 | 34 |
37 |
38 |
39 |
40 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/livechart/package-list: -------------------------------------------------------------------------------- 1 | $dokka.format:html 2 | $dokka.linkExtension:html 3 | 4 | com.yabu.livechart.model 5 | com.yabu.livechart.utils 6 | com.yabu.livechart.view 7 | 8 | -------------------------------------------------------------------------------- /docs/navigation.html: -------------------------------------------------------------------------------- 1 | 40 | 41 | -------------------------------------------------------------------------------- /docs/scripts/clipboard.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', () => { 2 | document.querySelectorAll('span.copy-icon').forEach(element => { 3 | element.addEventListener('click', (el) => copyElementsContentToClipboard(element)); 4 | }) 5 | 6 | document.querySelectorAll('span.anchor-icon').forEach(element => { 7 | element.addEventListener('click', (el) => { 8 | if(element.hasAttribute('pointing-to')){ 9 | const location = hrefWithoutCurrentlyUsedAnchor() + '#' + element.getAttribute('pointing-to') 10 | copyTextToClipboard(element, location) 11 | } 12 | }); 13 | }) 14 | }) 15 | 16 | const copyElementsContentToClipboard = (element) => { 17 | const selection = window.getSelection(); 18 | const range = document.createRange(); 19 | range.selectNodeContents(element.parentNode.parentNode); 20 | selection.removeAllRanges(); 21 | selection.addRange(range); 22 | 23 | copyAndShowPopup(element, () => selection.removeAllRanges()) 24 | } 25 | 26 | const copyTextToClipboard = (element, text) => { 27 | var textarea = document.createElement("textarea"); 28 | textarea.textContent = text; 29 | textarea.style.position = "fixed"; 30 | document.body.appendChild(textarea); 31 | textarea.select(); 32 | 33 | copyAndShowPopup(element, () => document.body.removeChild(textarea)) 34 | } 35 | 36 | const copyAndShowPopup = (element, after) => { 37 | try { 38 | document.execCommand('copy'); 39 | element.nextElementSibling.classList.add('active-popup'); 40 | setTimeout(() => { 41 | element.nextElementSibling.classList.remove('active-popup'); 42 | }, 1200); 43 | } catch (e) { 44 | console.error('Failed to write to clipboard:', e) 45 | } 46 | finally { 47 | if(after) after() 48 | } 49 | } 50 | 51 | const hrefWithoutCurrentlyUsedAnchor = () => window.location.href.split('#')[0] 52 | 53 | -------------------------------------------------------------------------------- /docs/scripts/navigationLoader.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', () => { 2 | fetch(pathToRoot + "navigation.html") 3 | .then(response => response.text()) 4 | .then(data => { 5 | document.getElementById("sideMenu").innerHTML = data; 6 | }).then(() => { 7 | document.querySelectorAll(".overview > a").forEach(link => { 8 | link.setAttribute("href", pathToRoot + link.getAttribute("href")); 9 | }) 10 | }).then(() => { 11 | document.querySelectorAll(".sideMenuPart").forEach(nav => { 12 | if (!nav.classList.contains("hidden")) nav.classList.add("hidden") 13 | }) 14 | }).then(() => { 15 | revealNavigationForCurrentPage() 16 | }) 17 | 18 | /* Smooth scrolling support for going to the top of the page */ 19 | document.querySelectorAll('a[href^="#"]').forEach(anchor => { 20 | anchor.addEventListener('click', function (e) { 21 | e.preventDefault(); 22 | 23 | document.querySelector(this.getAttribute('href')).scrollIntoView({ 24 | behavior: 'smooth' 25 | }); 26 | }); 27 | }); 28 | }) 29 | 30 | revealNavigationForCurrentPage = () => { 31 | let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); 32 | let parts = document.querySelectorAll(".sideMenuPart"); 33 | let found = 0; 34 | do { 35 | parts.forEach(part => { 36 | if (part.attributes['pageId'].value.indexOf(pageId) !== -1 && found === 0) { 37 | found = 1; 38 | if (part.classList.contains("hidden")){ 39 | part.classList.remove("hidden"); 40 | part.setAttribute('data-active',""); 41 | } 42 | revealParents(part) 43 | } 44 | }); 45 | pageId = pageId.substring(0, pageId.lastIndexOf("/")) 46 | } while (pageId.indexOf("/") !== -1 && found === 0) 47 | }; 48 | 49 | revealParents = (part) => { 50 | if (part.classList.contains("sideMenuPart")) { 51 | if (part.classList.contains("hidden")) part.classList.remove("hidden"); 52 | revealParents(part.parentNode) 53 | } 54 | }; -------------------------------------------------------------------------------- /docs/scripts/scripts.js: -------------------------------------------------------------------------------- 1 | document.getElementById("navigationFilter").oninput = function (e) { 2 | var input = e.target.value; 3 | var menuParts = document.getElementsByClassName("sideMenuPart") 4 | for (let part of menuParts) { 5 | if(part.querySelector("a").textContent.startsWith(input)) { 6 | part.classList.remove("filtered"); 7 | } else { 8 | part.classList.add("filtered"); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /docs/scripts/search.js: -------------------------------------------------------------------------------- 1 | let query = new URLSearchParams(window.location.search).get("query"); 2 | document.getElementById("searchTitle").innerHTML += '"' + query + '":'; 3 | document.getElementById("searchTable").innerHTML = pages 4 | .filter(el => el.name.toLowerCase().startsWith(query.toLowerCase())) 5 | .reduce((acc, element) => { 6 | return acc + '' + element.name + '' 7 | }, ""); -------------------------------------------------------------------------------- /docs/scripts/sourceset_dependencies.js: -------------------------------------------------------------------------------- 1 | sourceset_dependencies = '{":livechart/main": []}' 2 | -------------------------------------------------------------------------------- /docs/styles/jetbrains-mono.css: -------------------------------------------------------------------------------- 1 | @font-face{ 2 | font-family: 'JetBrains Mono'; 3 | src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/web/woff2/JetBrainsMono-Regular.woff2') format('woff2'); 4 | font-weight: normal; 5 | font-style: normal; 6 | } 7 | 8 | @font-face{ 9 | font-family: 'JetBrains Mono'; 10 | src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/web/woff2/JetBrainsMono-Bold.woff2') format('woff2'); 11 | font-weight: bold; 12 | font-style: normal; 13 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Jun 13 17:35:41 BST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /livechart/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /livechart/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'com.github.dcendents.android-maven' 5 | apply plugin: 'org.jetbrains.dokka' 6 | 7 | group='com.github.Pfuster12' 8 | 9 | android { 10 | compileSdkVersion 29 11 | buildToolsVersion "29.0.3" 12 | 13 | defaultConfig { 14 | minSdkVersion 21 15 | targetSdkVersion 29 16 | versionCode 3 17 | versionName "1.3.6" 18 | 19 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 20 | consumerProguardFiles "consumer-rules.pro" 21 | } 22 | 23 | buildTypes { 24 | release { 25 | minifyEnabled false 26 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 27 | } 28 | } 29 | } 30 | 31 | dokkaHtml { 32 | dokkaSourceSets { 33 | outputDirectory = "$rootDir/docs" 34 | create("main") { 35 | noAndroidSdkLink = true 36 | perPackageOption { 37 | skipEmptyPackages = true 38 | // Use to include or exclude non public members 39 | includeNonPublic = false 40 | prefix = " android.view.View" // will match android and all sub-packages of it 41 | suppress = true 42 | } 43 | } 44 | } 45 | } 46 | 47 | dependencies { 48 | implementation fileTree(dir: "libs", include: ["*.jar"]) 49 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 50 | implementation 'androidx.core:core-ktx:1.3.1' 51 | implementation 'androidx.appcompat:appcompat:1.2.0' 52 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7' 53 | testImplementation 'junit:junit:4.12' 54 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 55 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 56 | 57 | } -------------------------------------------------------------------------------- /livechart/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pfuster12/LiveChart/f61fa4fad141ea60f2027f81bce50cd23219753a/livechart/consumer-rules.pro -------------------------------------------------------------------------------- /livechart/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /livechart/src/androidTest/java/com/yabu/livechart/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.yabu.livechart.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /livechart/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | / 5 | -------------------------------------------------------------------------------- /livechart/src/main/java/com/yabu/livechart/model/Bounds.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart.model 2 | 3 | data class Bounds(var top: Float = 0f, 4 | var end: Float = 0f, 5 | var bottom: Float = 0f, 6 | var start: Float = 0f) -------------------------------------------------------------------------------- /livechart/src/main/java/com/yabu/livechart/model/DataPoint.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart.model 2 | 3 | data class DataPoint(val x: Float, 4 | val y: Float) -------------------------------------------------------------------------------- /livechart/src/main/java/com/yabu/livechart/model/Dataset.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart.model 2 | 3 | data class Dataset(val points: MutableList) { 4 | 5 | fun hasData(): Boolean { 6 | val sortedPoint = points.filter { point -> point.x > 0 } 7 | return sortedPoint.firstOrNull() != null 8 | 9 | } 10 | 11 | fun upperBound(): Float { 12 | val sortedPoint = points.sortedBy { point -> point.y } 13 | return sortedPoint.lastOrNull()?.y ?: 0f 14 | } 15 | 16 | fun lowerBound(): Float { 17 | val sortedPoint = points.sortedBy { point -> point.y } 18 | .filter { point -> point.x >= 0 } 19 | return sortedPoint.firstOrNull()?.y ?: 0f 20 | } 21 | 22 | companion object { 23 | fun new() = Dataset( 24 | points = mutableListOf(DataPoint(0f, 0f)) 25 | ) 26 | } 27 | } -------------------------------------------------------------------------------- /livechart/src/main/java/com/yabu/livechart/utils/EPointF.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart.utils 2 | 3 | /** 4 | * Code adapted for LiveChart from Stuart Kent - July 3, 2015 5 | * https://www.stkent.com/2015/07/03/building-smooth-paths-using-bezier-curves.html 6 | */ 7 | class EPointF(val x: Float, val y: Float) { 8 | 9 | fun plus(factor: Float, ePointF: EPointF): EPointF { 10 | return EPointF(x + factor * ePointF.x, y + factor * ePointF.y) 11 | } 12 | 13 | operator fun plus(ePointF: EPointF): EPointF { 14 | return plus(1.0f, ePointF) 15 | } 16 | 17 | fun minus(factor: Float, ePointF: EPointF): EPointF { 18 | return EPointF(x - factor * ePointF.x, y - factor * ePointF.y) 19 | } 20 | 21 | operator fun minus(ePointF: EPointF): EPointF { 22 | return minus(1.0f, ePointF) 23 | } 24 | 25 | fun scaleBy(factor: Float): EPointF { 26 | return EPointF(factor * x, factor * y) 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /livechart/src/main/java/com/yabu/livechart/utils/PublicApi.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart.utils 2 | 3 | /** 4 | * Annotates a function exposed to users of this library as public api 5 | * to interact with the live chart. 6 | */ 7 | @Target(AnnotationTarget.FUNCTION) 8 | @MustBeDocumented 9 | internal annotation class PublicApi -------------------------------------------------------------------------------- /livechart/src/main/java/com/yabu/livechart/view/LiveChartAttributes.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart.view 2 | 3 | import android.graphics.Color 4 | 5 | internal object LiveChartAttributes { 6 | const val STROKE_WIDTH = 4f 7 | 8 | const val BASELINE_STROKE_WIDTH = 2f 9 | 10 | const val DASH_LINE_GAP = 15f 11 | 12 | const val DASH_LINE_STROKE = 10f 13 | 14 | const val TEXT_COLOR = Color.BLACK 15 | 16 | const val MAIN_COLOR = Color.BLACK 17 | 18 | const val SECOND_COLOR = Color.GRAY 19 | 20 | const val TRANSPARENT_COLOR = "#00000000" 21 | 22 | const val CORNER_RADIUS = 0f 23 | 24 | const val POSITIVE_COLOR = "#01C194" 25 | 26 | const val FILL_COLOR = "#11303030" 27 | 28 | const val POSITIVE_FILL_COLOR = "#1101C194" 29 | 30 | const val NEGATIVE_COLOR = "#d70a53" 31 | 32 | const val NEGATIVE_FILL_COLOR = "#11d70a53" 33 | 34 | const val BOUNDS_LINE_COLOR = Color.GRAY 35 | 36 | const val BASELINE_LINE_COLOR = Color.GRAY 37 | 38 | const val GUIDELINE_COLOR = Color.LTGRAY 39 | 40 | const val TAG_WIDTH = 120f 41 | 42 | const val CHART_END_PADDING = 140f 43 | 44 | const val TAG_PADDING = 8f 45 | 46 | const val TEXT_HEIGHT = 30f 47 | 48 | const val OVERLAY_LINE_COLOR = Color.GRAY 49 | 50 | const val OVERLAY_CIRCLE_COLOR = Color.BLACK 51 | 52 | const val OVERLAY_CIRCLE_DIAMETER = 24f 53 | } -------------------------------------------------------------------------------- /livechart/src/main/java/com/yabu/livechart/view/LiveChartStyle.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart.view 2 | 3 | import android.graphics.Color 4 | 5 | /** 6 | * Class containing style properties to format a LiveChart. 7 | */ 8 | class LiveChartStyle { 9 | 10 | /** 11 | * Label text color. 12 | */ 13 | var textColor: Int = LiveChartAttributes.TEXT_COLOR 14 | 15 | /** 16 | * Main color 17 | */ 18 | var mainColor: Int = LiveChartAttributes.MAIN_COLOR 19 | 20 | /** 21 | * Main color 22 | */ 23 | var secondColor: Int = LiveChartAttributes.SECOND_COLOR 24 | 25 | /** 26 | * Positive from baseline fill color. 27 | */ 28 | var mainFillColor: Int = Color.parseColor(LiveChartAttributes.FILL_COLOR) 29 | 30 | /** 31 | * Positive from baseline color. 32 | */ 33 | var positiveColor: Int = Color.parseColor(LiveChartAttributes.POSITIVE_COLOR) 34 | 35 | /** 36 | * Negative from baseline color. 37 | */ 38 | var negativeColor: Int = Color.parseColor(LiveChartAttributes.NEGATIVE_COLOR) 39 | 40 | /** 41 | * Positive from baseline fill color. 42 | */ 43 | var positiveFillColor: Int = Color.parseColor(LiveChartAttributes.POSITIVE_FILL_COLOR) 44 | 45 | /** 46 | * Negative from baseline fill color. 47 | */ 48 | var negativeFillColor: Int = Color.parseColor(LiveChartAttributes.NEGATIVE_FILL_COLOR) 49 | 50 | /** 51 | * Main Path corner radius pixel amount. 52 | */ 53 | var mainCornerRadius: Float = LiveChartAttributes.CORNER_RADIUS 54 | 55 | /** 56 | * Second Path corner radius pixel amount. 57 | */ 58 | var secondCornerRadius: Float = LiveChartAttributes.CORNER_RADIUS 59 | 60 | /** 61 | * Baseline color. 62 | */ 63 | var baselineColor: Int = LiveChartAttributes.BASELINE_LINE_COLOR 64 | 65 | /** 66 | * Bounds color. 67 | */ 68 | var boundsLineColor: Int = LiveChartAttributes.BOUNDS_LINE_COLOR 69 | 70 | /** 71 | * Baseline color. 72 | */ 73 | var guideLineColor: Int = LiveChartAttributes.GUIDELINE_COLOR 74 | 75 | /** 76 | * Path stroke width 77 | */ 78 | var pathStrokeWidth = LiveChartAttributes.STROKE_WIDTH 79 | 80 | /** 81 | * Second dataset Path stroke width 82 | */ 83 | var secondPathStrokeWidth = LiveChartAttributes.STROKE_WIDTH 84 | 85 | /** 86 | * Baseline stroke width 87 | */ 88 | var baselineStrokeWidth = LiveChartAttributes.BASELINE_STROKE_WIDTH 89 | 90 | /** 91 | * Baseline dash line width 92 | */ 93 | var baselineDashLineWidth = LiveChartAttributes.DASH_LINE_STROKE 94 | 95 | /** 96 | * Baseline dash line gap width 97 | */ 98 | var baselineDashLineGap = LiveChartAttributes.DASH_LINE_GAP 99 | 100 | /** 101 | * Baseline dash line gap width 102 | */ 103 | var chartEndPadding = LiveChartAttributes.CHART_END_PADDING 104 | 105 | /** 106 | * Chart text height 107 | */ 108 | var textHeight = LiveChartAttributes.TEXT_HEIGHT 109 | 110 | /** 111 | * Overlay vertical line color. 112 | */ 113 | var overlayLineColor = LiveChartAttributes.OVERLAY_LINE_COLOR 114 | 115 | /** 116 | * Overlay livechart_circle color. 117 | */ 118 | var overlayCircleColor = LiveChartAttributes.OVERLAY_CIRCLE_COLOR 119 | 120 | /** 121 | * Overlay livechart_circle diameter. 122 | */ 123 | var overlayCircleDiameter = LiveChartAttributes.OVERLAY_CIRCLE_DIAMETER 124 | } -------------------------------------------------------------------------------- /livechart/src/main/res/drawable/livechart_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /livechart/src/main/res/layout/livechart_touch_overlay.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /livechart/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /livechart/src/test/java/com/yabu/livechart/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.yabu.livechart 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':livechart' 2 | include ':app' 3 | rootProject.name = "LiveChartDemoApp" --------------------------------------------------------------------------------