├── .gitignore
├── .gradle
└── vcs-1
│ └── gc.properties
├── .idea
├── codeStyles
│ └── codeStyleConfig.xml
└── encodings.xml
├── CHINESE-README.md
├── LICENSE
├── README.md
├── build.gradle.kts
├── buildSrc
├── build.gradle.kts
└── src
│ └── main
│ └── java
│ └── Constants.kt
├── charts
├── build.gradle.kts
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ ├── AAChartView.html
│ ├── AAChartView.js
│ ├── AAEasing.js
│ ├── AAFunnel.js
│ ├── AAHighcharts-More.js
│ ├── AAHighcharts.js
│ └── AARounded-Corners.js
│ └── java
│ └── com
│ └── github
│ └── aachartmodel
│ └── aainfographics
│ ├── aachartcreator
│ ├── AAChartModel.kt
│ ├── AAChartView.kt
│ ├── AAOptions.kt
│ └── AASeriesElement.kt
│ ├── aaoptionsmodel
│ ├── AAAnimation.kt
│ ├── AAAxis.kt
│ ├── AAChart.kt
│ ├── AAColumn.kt
│ ├── AACredits.kt
│ ├── AACrosshair.kt
│ ├── AADataLabels.kt
│ ├── AADateTimeLabelFormats.kt
│ ├── AALabel.kt
│ ├── AALabels.kt
│ ├── AALang.kt
│ ├── AALegend.kt
│ ├── AALine.kt
│ ├── AAMarker.kt
│ ├── AAPane.kt
│ ├── AAPie.kt
│ ├── AAPlotBandsElement.kt
│ ├── AAPlotLinesElement.kt
│ ├── AAPlotOptions.kt
│ ├── AAScatter.kt
│ ├── AAScrollablePlotArea.kt
│ ├── AASeries.kt
│ ├── AAShadow.kt
│ ├── AAStates.kt
│ ├── AAStyle.kt
│ ├── AASubtitle.kt
│ ├── AATitle.kt
│ ├── AATooltip.kt
│ ├── AAXAxis.kt
│ ├── AAYAxis.kt
│ └── AAZonesElement.kt
│ └── aatools
│ ├── AABuilder.kt
│ ├── AAColor.kt
│ ├── AADateUTC.kt
│ ├── AAGradientColor.kt
│ └── AAJSStringPurer.kt
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── sample
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── github
│ │ └── aachartmodel
│ │ └── aainfographics
│ │ └── demo
│ │ ├── additionalcontent
│ │ ├── AdvancedUpdatingFeatureActivity.kt
│ │ ├── DoubleChartsLinkedWorkActivity.kt
│ │ ├── DrawChartWithAAOptionsActivity.kt
│ │ ├── EvaluateJSStringFunctionActivity.kt
│ │ ├── HideOrShowChartSeriesActivity.kt
│ │ ├── JSFormatterFunctionActivity.kt
│ │ ├── JSFunctionForAAAxisActivity.kt
│ │ ├── JSFunctionForAAChartEventsActivity.kt
│ │ ├── JSFunctionForAALegendActivity.kt
│ │ ├── JSFunctionForAAOptionsActivity.kt
│ │ ├── OnlyRefreshChartDataActivity.kt
│ │ ├── ScrollableChartActivity.kt
│ │ └── ScrollingUpdateDataActivity.kt
│ │ ├── basiccontent
│ │ ├── BasicChartActivity.kt
│ │ ├── CustomStyleChartActivity.kt
│ │ ├── MainActivity.kt
│ │ ├── MixedChartActivity.kt
│ │ ├── MyBaseExpandableListAdapter.kt
│ │ └── SpecialChartActivity.kt
│ │ └── chartcomposer
│ │ ├── AAChartSymbolConst.kt
│ │ ├── BasicChartComposer.kt
│ │ ├── ChartOptionsComposer.kt
│ │ ├── CustomStyleChartComposer.kt
│ │ ├── JSFunctionForAAAxisComposer.kt
│ │ ├── JSFunctionForAAChartEventsComposer.kt
│ │ ├── JSFunctionForAAChartEventsComposer2.kt
│ │ ├── JSFunctionForAALegendComposer.kt
│ │ ├── JSFunctionForAAOptionsComposer.kt
│ │ ├── JSFunctionForAATooltipComposer.kt
│ │ ├── MixedChartComposer.kt
│ │ └── SpecialChartComposer.kt
│ └── res
│ ├── drawable-v24
│ └── ic_launcher_foreground.xml
│ ├── drawable
│ └── ic_launcher_background.xml
│ ├── layout
│ ├── activity_basic_chart.xml
│ ├── activity_custom_style_chart.xml
│ ├── activity_custom_tooltip_with_jsfunction.xml
│ ├── activity_double_charts_linked_work.xml
│ ├── activity_draw_chart_with_aaoptions.xml
│ ├── activity_evaluate_jsstring_function.xml
│ ├── activity_hide_or_show_chart_series.xml
│ ├── activity_jsfunction_for_aachart_events.xml
│ ├── activity_main.xml
│ ├── activity_mixed_chart.xml
│ ├── activity_only_refresh_chart_data.xml
│ ├── activity_scollable_chart.xml
│ ├── activity_scrolling_update_data.xml
│ ├── activity_special_chart.xml
│ ├── item_exlist_group.xml
│ └── item_exlist_item.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
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
└── settings.gradle.kts
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/java,android,osx,intellij,gradle
3 |
4 | ### Android ###
5 | # Built application files
6 | *.apk
7 | *.ap_
8 |
9 | # Files for the ART/Dalvik VM
10 | *.dex
11 |
12 | # Java class files
13 | *.class
14 |
15 | # Generated files
16 | bin/
17 | gen/
18 | out/
19 |
20 | # Gradle files
21 | .gradle/
22 | build/
23 |
24 | # Local configuration file (sdk path, etc)
25 | local.properties
26 |
27 | # Proguard folder generated by Eclipse
28 | proguard/
29 |
30 | # Log Files
31 | *.log
32 |
33 | # Android Studio Navigation editor temp files
34 | .navigation/
35 |
36 | # Android Studio captures folder
37 | captures/
38 |
39 | # Intellij
40 | *.iml
41 | .idea/
42 |
43 | # Keystore files
44 | #*.jks
45 |
46 | # External native build folder generated in Android Studio 2.2 and later
47 | .externalNativeBuild
48 |
49 | # Google Services (e.g. APIs or Firebase)
50 | #google-services.json
51 |
52 | # Freeline
53 | freeline.py
54 | freeline/
55 | freeline_project_description.json
56 |
57 | ### Android Patch ###
58 | gen-external-apklibs
59 |
60 | ### Intellij ###
61 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
62 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
63 |
64 | # User-specific stuff:
65 | .idea/**/workspace.xml
66 | .idea/**/tasks.xml
67 |
68 | # Sensitive or high-churn files:
69 | .idea/**/dataSources/
70 | .idea/**/dataSources.ids
71 | .idea/**/dataSources.xml
72 | .idea/**/dataSources.local.xml
73 | .idea/**/sqlDataSources.xml
74 | .idea/**/dynamic.xml
75 | .idea/**/uiDesigner.xml
76 |
77 | # Gradle:
78 | .idea/**/gradle.xml
79 | .idea/**/libraries
80 |
81 | # Mongo Explorer plugin:
82 | .idea/**/mongoSettings.xml
83 |
84 | ## File-based project format:
85 | *.iws
86 |
87 | ## Plugin-specific files:
88 |
89 | # IntelliJ
90 | /out/
91 |
92 | # mpeltonen/sbt-idea plugin
93 | .idea_modules/
94 |
95 | # JIRA plugin
96 | atlassian-ide-plugin.xml
97 |
98 | # Crashlytics plugin (for Android Studio and IntelliJ)
99 | com_crashlytics_export_strings.xml
100 | crashlytics.properties
101 | crashlytics-build.properties
102 | fabric.properties
103 |
104 | ### Intellij Patch ###
105 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
106 |
107 | # *.iml
108 | # modules.xml
109 | # .idea/misc.xml
110 | # *.ipr
111 |
112 | ### Java ###
113 | # Compiled class file
114 |
115 | # Log file
116 |
117 | # BlueJ files
118 | *.ctxt
119 |
120 | # Mobile Tools for Java (J2ME)
121 | .mtj.tmp/
122 |
123 | # Package Files #
124 | *.jar
125 | *.war
126 | *.ear
127 | *.zip
128 | *.tar.gz
129 | *.rar
130 |
131 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
132 | hs_err_pid*
133 |
134 | ### OSX ###
135 | *.DS_Store
136 | .AppleDouble
137 | .LSOverride
138 |
139 | # Icon must end with two \r
140 | Icon
141 |
142 |
143 | # Thumbnails
144 | ._*
145 |
146 | # Files that might appear in the root of a volume
147 | .DocumentRevisions-V100
148 | .fseventsd
149 | .Spotlight-V100
150 | .TemporaryItems
151 | .Trashes
152 | .VolumeIcon.icns
153 | .com.apple.timemachine.donotpresent
154 |
155 | # Directories potentially created on remote AFP share
156 | .AppleDB
157 | .AppleDesktop
158 | Network Trash Folder
159 | Temporary Items
160 | .apdisk
161 |
162 | ### Gradle ###
163 | .gradle
164 | /build/
165 |
166 | # Ignore Gradle GUI config
167 | gradle-app.setting
168 |
169 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
170 | !gradle-wrapper.jar
171 |
172 | # Cache of project
173 | .gradletasknamecache
174 |
175 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
176 | # gradle/wrapper/gradle-wrapper.properties
177 |
178 | # End of https://www.gitignore.io/api/java,android,osx,intellij,gradle
179 | /app/build/
180 |
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/build.gradle.kts:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 |
7 | dependencies {
8 | // 将 Android Gradle 插件添加到 classpath,这是构建 Android 项目所必需的。
9 | classpath(Libs.com_android_tools_build_gradle)
10 |
11 | // 将 Kotlin Gradle 插件添加到 classpath,这是构建 Kotlin 项目所必需的。
12 | classpath(Libs.org_jetbrains_kotlin_kotlin_gradle_plugin)
13 | }
14 | }
15 |
16 | plugins {
17 | mavenPublish
18 | }
19 |
20 | allprojects {
21 | repositories {
22 | google()
23 | mavenCentral()
24 | maven(url = "https://jitpack.io")
25 | }
26 | }
27 |
28 | task("clean") {
29 | delete(rootProject.buildDir)
30 | }
31 |
32 | tasks.withType {
33 | options {
34 | this as StandardJavadocDocletOptions
35 | addStringOption("Xdoclint:none", "-quiet")
36 | addStringOption("encoding", "UTF-8")
37 | }
38 | }
39 |
40 | //For Groovy build.gradle files
41 | project.extra.apply {
42 | set("minSdkVersion", AndroidConstants.minSdkVersion)
43 | set("targetSdkVersion", AndroidConstants.targetSdkVersion)
44 | set("compileSdkVersion", AndroidConstants.compileSdkVersions)
45 | set("buildToolsVersion", AndroidConstants.buildToolsVersion)
46 | }
47 |
--------------------------------------------------------------------------------
/buildSrc/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | `kotlin-dsl`
3 | }
4 | repositories {
5 | mavenCentral()
6 | }
--------------------------------------------------------------------------------
/buildSrc/src/main/java/Constants.kt:
--------------------------------------------------------------------------------
1 | import org.gradle.plugin.use.PluginDependenciesSpec
2 | import org.gradle.plugin.use.PluginDependencySpec
3 |
4 | object AndroidConstants {
5 | const val minSdkVersion = 19
6 | const val targetSdkVersion = 30
7 | const val compileSdkVersions = 30
8 | const val buildToolsVersion = "30.0.2"
9 | }
10 |
11 | object Versions {
12 | const val build_gradle_version = "7.3.1"
13 | const val kotlin_gradle_plugin_version = "1.9.23"
14 | const val bintray_plugin_version = "1.8.5"
15 |
16 | const val bintray_version = "1.8.5"
17 | const val kotlin_stdlib_version = "1.4.10"
18 | const val gson_version = "2.10.1"
19 | }
20 |
21 | object Libs {
22 | const val com_jfrog_bintray = "com.jfrog.bintray.gradle"
23 | const val maven_publish = "maven-publish"
24 |
25 | const val com_android_tools_build_gradle = "com.android.tools.build:gradle:${Versions.build_gradle_version}"
26 | const val org_jetbrains_kotlin_kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin_gradle_plugin_version}"
27 | const val com_jfrog_bintray_gradle_bintray_plugin = com_jfrog_bintray + ":gradle-bintray-plugin:${Versions.bintray_plugin_version}"
28 |
29 | const val kotlin_jdk = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.kotlin_stdlib_version}"
30 | const val gson = "com.google.code.gson:gson:${Versions.gson_version}"
31 | }
32 |
33 | val PluginDependenciesSpec.mavenPublish: PluginDependencySpec
34 | inline get() = id(Libs.maven_publish)
35 |
36 | val PluginDependenciesSpec.bintray: PluginDependencySpec
37 | inline get() = id(Libs.com_jfrog_bintray).version(Versions.bintray_version)
--------------------------------------------------------------------------------
/charts/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.library")
3 | kotlin("android")
4 | id("maven-publish")
5 | }
6 |
7 | buildscript {
8 | repositories {
9 | mavenCentral()
10 | }
11 | }
12 |
13 | android {
14 | compileSdkVersion(AndroidConstants.compileSdkVersions)
15 |
16 | defaultConfig {
17 | minSdkVersion(AndroidConstants.minSdkVersion)
18 | targetSdkVersion(AndroidConstants.targetSdkVersion)
19 | }
20 | compileOptions {
21 | sourceCompatibility = JavaVersion.VERSION_1_8
22 | targetCompatibility = JavaVersion.VERSION_1_8
23 | }
24 | kotlinOptions {
25 | jvmTarget = "1.8"
26 | }
27 | }
28 |
29 | dependencies {
30 | implementation(Libs.gson)
31 | }
32 |
33 | afterEvaluate {
34 | configure {
35 | val artifact = "charts"
36 | val publishedGroupId = "com.github.aachartmodel.aainfographics"
37 | val libraryName = "AAChartCore-Kotlin"
38 |
39 | publications {
40 | create("maven") {
41 | groupId = publishedGroupId
42 | artifactId = artifact
43 | version = "1.0.0"
44 |
45 | artifact(tasks.getByName("sourcesJar"))
46 | artifact("$buildDir/outputs/aar/${artifactId}-release.aar") {
47 | builtBy(tasks.getByName("assemble"))
48 | }
49 |
50 | pom {
51 | packaging = "aar"
52 | name.set(libraryName)
53 | licenses {
54 | license {
55 | name.set("The Apache Software License, Version 2.0")
56 | url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
57 | }
58 | }
59 | withXml {
60 | val dependenciesNode = asNode().appendNode("dependencies")
61 | configurations.getByName("implementation") {
62 | dependencies.forEach {
63 | val dependencyNode = dependenciesNode.appendNode("dependency")
64 | dependencyNode.appendNode("groupId", it.group)
65 | dependencyNode.appendNode("artifactId", it.name)
66 | dependencyNode.appendNode("version", it.version)
67 | }
68 | }
69 | }
70 | }
71 | }
72 | }
73 | }
74 | }
75 |
76 | val sourcesJar by tasks.registering(Jar::class) {
77 | archiveClassifier.set("sources")
78 | from(android.sourceSets.getByName("main").java.srcDirs)
79 | }
--------------------------------------------------------------------------------
/charts/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/charts/src/main/assets/AAChartView.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 | AAChartKit-Swift
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/charts/src/main/assets/AAChartView.js:
--------------------------------------------------------------------------------
1 |
2 | var aaGlobalChart;
3 |
4 | function loadTheHighChartView (sender,receivedWidth, receivedHeight) {
5 | var aaOptions = JSON.parse(sender, function (key, value) {
6 | if ( typeof(value) == 'string'
7 | && value.indexOf('function') != -1) {
8 | return eval(value)
9 | }
10 | return value;
11 | });
12 |
13 | if (aaOptions.xAxisArray) {
14 | aaOptions.xAxis = aaOptions.xAxisArray
15 | }
16 |
17 | if (aaOptions.yAxisArray) {
18 | aaOptions.yAxis = aaOptions.yAxisArray
19 | }
20 |
21 | if (aaOptions.defaultOptions) {
22 | Highcharts.setOptions({
23 | lang: aaOptions.defaultOptions
24 | });
25 | }
26 |
27 | if (aaOptions.plotOptions) {
28 | configurePlotOptions(aaOptions);
29 | }
30 |
31 | aaGlobalChart = Highcharts.chart('container', aaOptions);
32 | //全局配置(可通过全局配置设置主题)https://api.hcharts.cn/highcharts#Highcharts.setOptions
33 | };
34 |
35 | function configurePlotOptions(aaOptions) {
36 | var aaPlotOptions = aaOptions.plotOptions;
37 | var animation = aaPlotOptions.series.animation;
38 | if (animation) {//懒调用(只有在 AAChartModel 实例对象设置了 animationType 属性值的时候才会调用设置动画类型的函数,否则不调用)
39 | var animationEasingType = animation.easing;
40 | animation.easing = configureTheChartAnimationEasingType(animationEasingType);
41 | }
42 |
43 | if (aaOptions.clickEventEnabled == true) {
44 | configureChartClickEvent(aaPlotOptions);
45 | }
46 |
47 | if (aaOptions.touchEventEnabled == true) {
48 | configureChartTouchEvent(aaPlotOptions);
49 | }
50 | }
51 |
52 | function configureEventMessageBody(selectedPoint) {
53 | return {
54 | name: selectedPoint.series.name,
55 | x: selectedPoint.x,
56 | y: selectedPoint.y,
57 | category: selectedPoint.category ? selectedPoint.category : selectedPoint.name,
58 | index: selectedPoint.index,
59 | offset: {
60 | plotX: selectedPoint.plotX,
61 | plotY: selectedPoint.plotY
62 | },
63 | };
64 | }
65 |
66 | function configureChartClickEvent(aaPlotOptions) {
67 | var clickEventFunc = function() {
68 | var message = configureEventMessageBody(this);
69 | var messageStr = JSON.stringify(message);
70 | window.androidObject.clickEventAndroidMethod(messageStr);
71 | };
72 |
73 | aaPlotOptions.series.point.events.click = clickEventFunc;
74 | }
75 |
76 | function configureChartTouchEvent(aaPlotOptions) {
77 | var mouseOverEventFunc = function() {
78 | var message = configureEventMessageBody(this);
79 | var messageStr = JSON.stringify(message);
80 | window.androidObject.moveOverEventAndroidMethod(messageStr);
81 | };
82 |
83 | aaPlotOptions.series.point.events.mouseOver = mouseOverEventFunc;
84 | }
85 |
86 | function onlyRefreshTheChartDataWithSeries(receivedSeries, animation) {
87 | let receivedSeriesArr = JSON.parse(receivedSeries);
88 | let animationBool = (animation === "true");
89 |
90 | aaGlobalChart.update({
91 | series: receivedSeriesArr
92 | },
93 | true, false, animationBool
94 | );
95 | }
96 |
97 | function updateChart(optionsStr, redraw) {
98 | var options = JSON.parse(optionsStr);
99 | aaGlobalChart.update(options,redraw);
100 | }
101 |
102 | function addPointToChartSeries(elementIndex, optionsStr, redraw, shift, animation) {
103 | var options = JSON.parse(optionsStr);
104 | var redrawBool = (redraw == "true") ? true:false;
105 | var shiftBool = (shift == "true") ? true:false;
106 | var animationBool = (animation == "true") ? true:false;
107 |
108 | var seriesElement = aaGlobalChart.series[elementIndex];
109 | seriesElement.addPoint(options, redrawBool, shiftBool, animationBool);
110 | }
111 |
112 | //pragma mark -- setter method
113 | function setTheChartViewContentWidth(receivedWidth) {
114 | var container = document.getElementById('container'); //获得元素
115 | container.style.width = receivedWidth; //设置宽度
116 | aaGlobalChart.reflow();
117 | }
118 |
119 | function setTheChartViewContentHeight(receivedHeight) {
120 | var container = document.getElementById('container'); //获得元素
121 | container.style.height = receivedHeight; //设置高度
122 | aaGlobalChart.reflow();
123 | }
124 |
125 | function setChartSeriesHidden(hidden) {
126 | for (var i = 0; i < aaGlobalChart.series.length; i++) {
127 | var seriesElement = aaGlobalChart.series[i];
128 | if (hidden == true) {
129 | seriesElement.hide();
130 | } else {
131 | seriesElement.show();
132 | }
133 | }
134 | }
135 |
136 | function showTheSeriesElementContentWithIndex(elementIndex) {
137 | var seriesElement = aaGlobalChart.series[elementIndex];
138 | seriesElement.show();
139 | }
140 |
141 | function hideTheSeriesElementContentWithIndex(elementIndex) {
142 | var seriesElement = aaGlobalChart.series[elementIndex];
143 | seriesElement.hide();
144 | }
145 |
146 | function addElementToChartSeriesWithElement(elementStr) {
147 | var seriesElement = JSON.parse(elementStr);
148 | aaGlobalChart.addSeries(seriesElement);
149 | }
150 |
151 | function removeElementFromChartSeriesWithElementIndex(elementIndex) {
152 | var seriesElement = aaGlobalChart.series[elementIndex];
153 | if (seriesElement) {
154 | seriesElement.remove(true);
155 | }
156 | }
157 |
158 | function evaluateTheJavaScriptStringFunction(jsStringFunction) {
159 | eval(jsStringFunction);
160 | }
161 |
--------------------------------------------------------------------------------
/charts/src/main/assets/AAEasing.js:
--------------------------------------------------------------------------------
1 | function configureTheChartAnimationEasingType(easingType){var animationObject={easeInQuad:function(pos){return Math.pow(pos,2)},easeOutQuad:function(pos){return -(Math.pow((pos-1),2)-1)},easeInOutQuad:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,2)}return -0.5*((pos-=2)*pos-2)},easeInCubic:function(pos){return Math.pow(pos,3)},easeOutCubic:function(pos){return(Math.pow((pos-1),3)+1)},easeInOutCubic:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,3)}return 0.5*(Math.pow((pos-2),3)+2)},easeInQuart:function(pos){return Math.pow(pos,4)},easeOutQuart:function(pos){return -(Math.pow((pos-1),4)-1)},easeInOutQuart:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,4)}return -0.5*((pos-=2)*Math.pow(pos,3)-2)},easeInQuint:function(pos){return Math.pow(pos,5)},easeOutQuint:function(pos){return(Math.pow((pos-1),5)+1)},easeInOutQuint:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,5)}return 0.5*(Math.pow((pos-2),5)+2)},easeInSine:function(pos){return -Math.cos(pos*(Math.PI/2))+1},easeOutSine:function(pos){return Math.sin(pos*(Math.PI/2))},easeInOutSine:function(pos){return(-0.5*(Math.cos(Math.PI*pos)-1))},easeInExpo:function(pos){return(pos===0)?0:Math.pow(2,10*(pos-1))},easeOutExpo:function(pos){return(pos===1)?1:-Math.pow(2,-10*pos)+1},easeInOutExpo:function(pos){if(pos===0){return 0}if(pos===1){return 1}if((pos/=0.5)<1){return 0.5*Math.pow(2,10*(pos-1))}return 0.5*(-Math.pow(2,-10*--pos)+2)},easeInCirc:function(pos){return -(Math.sqrt(1-(pos*pos))-1)},easeOutCirc:function(pos){return Math.sqrt(1-Math.pow((pos-1),2))},easeInOutCirc:function(pos){if((pos/=0.5)<1){return -0.5*(Math.sqrt(1-pos*pos)-1)}return 0.5*(Math.sqrt(1-(pos-=2)*pos)+1)},easeOutBounce:function(pos){if((pos)<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}},easeInBack:function(pos){var s=1.70158;return(pos)*pos*((s+1)*pos-s)},easeOutBack:function(pos){var s=1.70158;return(pos=pos-1)*pos*((s+1)*pos+s)+1},easeInOutBack:function(pos){var s=1.70158;if((pos/=0.5)<1){return 0.5*(pos*pos*(((s*=(1.525))+1)*pos-s))}return 0.5*((pos-=2)*pos*(((s*=(1.525))+1)*pos+s)+2)},elastic:function(pos){return -1*Math.pow(4,-8*pos)*Math.sin((pos*6-1)*(2*Math.PI)/2)+1},swingFromTo:function(pos){var s=1.70158;return((pos/=0.5)<1)?0.5*(pos*pos*(((s*=(1.525))+1)*pos-s)):0.5*((pos-=2)*pos*(((s*=(1.525))+1)*pos+s)+2)},swingFrom:function(pos){var s=1.70158;return pos*pos*((s+1)*pos-s)},swingTo:function(pos){var s=1.70158;return(pos-=1)*pos*((s+1)*pos+s)+1},bounce:function(pos){if(pos<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}},bouncePast:function(pos){if(pos<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return 2-(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return 2-(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return 2-(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}},easeFromTo:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,4)}return -0.5*((pos-=2)*Math.pow(pos,3)-2)},easeFrom:function(pos){return Math.pow(pos,4)},easeTo:function(pos){return Math.pow(pos,0.25)}};return animationObject[easingType]};
--------------------------------------------------------------------------------
/charts/src/main/assets/AAFunnel.js:
--------------------------------------------------------------------------------
1 | /*
2 | Highcharts JS v10.0.0 (2022-03-07)
3 |
4 | Highcharts funnel module
5 |
6 | (c) 2010-2021 Torstein Honsi
7 |
8 | License: www.highcharts.com/license
9 | */
10 | (function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts"],function(n){a(n);a.Highcharts=n;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function n(a,l,f,d){a.hasOwnProperty(l)||(a[l]=d.apply(null,f),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:l,module:a[l]}})))}a=a?a._modules:{};n(a,"Series/Funnel/FunnelSeries.js",
11 | [a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,l,f,d){var n=this&&this.__extends||function(){var a=function(b,g){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,e){g.__proto__=e}||function(g,e){for(var a in e)e.hasOwnProperty(a)&&(g[a]=e[a])};return a(b,g)};return function(b,g){function D(){this.constructor=b}a(b,g);b.prototype=null===g?Object.create(g):(D.prototype=g.prototype,new D)}}(),J=l.noop,y=f.series,
12 | c=f.seriesTypes.pie;l=d.addEvent;var z=d.extend,L=d.fireEvent,A=d.isArray,B=d.merge,I=d.pick;d=function(a){function b(){var g=null!==a&&a.apply(this,arguments)||this;g.data=void 0;g.options=void 0;g.points=void 0;return g}n(b,a);b.prototype.alignDataLabel=function(g,a,e,b,k){var u=g.series;b=u.options.reversed;var h=g.dlBox||g.shapeArgs,d=e.align,c=e.verticalAlign,f=((u.options||{}).dataLabels||{}).inside,m=u.center[1];u=u.getWidthAt((b?2*m-g.plotY:g.plotY)-h.height/2+a.height);u="middle"===c?(h.topWidth-
13 | h.bottomWidth)/4:(u-h.bottomWidth)/2;m=h.y;var p=h.x,D=I(a.height,a.getBBox().height);"middle"===c?m=h.y-h.height/2+D/2:"top"===c&&(m=h.y-h.height+D+e.padding);if("top"===c&&!b||"bottom"===c&&b||"middle"===c)"right"===d?p=h.x-e.padding+u:"left"===d&&(p=h.x+e.padding-u);b={x:p,y:b?m-h.height:m,width:h.bottomWidth,height:h.height};e.verticalAlign="bottom";f&&!g.visible||y.prototype.alignDataLabel.call(this,g,a,e,b,k);f&&(!g.visible&&g.dataLabel&&(g.dataLabel.placed=!1),g.contrastColor&&a.css({color:g.contrastColor}))};
14 | b.prototype.drawDataLabels=function(){var a=this.data,b=this.options.dataLabels.distance,e,c=a.length;for(this.center[2]-=2*b;c--;){var k=a[c];var d=(e=k.half)?1:-1;var h=k.plotY;k.labelDistance=I(k.options.dataLabels&&k.options.dataLabels.distance,b);this.maxLabelDistance=Math.max(k.labelDistance,this.maxLabelDistance||0);var y=this.getX(h,e,k);k.labelPosition={natural:{x:0,y:h},"final":{},alignment:e?"right":"left",connectorPosition:{breakAt:{x:y+(k.labelDistance-5)*d,y:h},touchingSliceAt:{x:y+
15 | k.labelDistance*d,y:h}}}}f.seriesTypes[this.options.dataLabels.inside?"column":"pie"].prototype.drawDataLabels.call(this)};b.prototype.translate=function(){function a(a,b){return/%$/.test(a)?b*parseInt(a,10)/100:parseInt(a,10)}var b=0,e=this,c=e.chart,k=e.options,d=k.reversed,h=k.ignoreHiddenPoint,f=c.plotWidth;c=c.plotHeight;var y=0,l=k.center,m=a(l[0],f),p=a(l[1],c),n=a(k.width,f),v,w=a(k.height,c),z=a(k.neckWidth,f),H=a(k.neckHeight,c),A=p-w/2+w-H;f=e.data;var B,F,K="left"===k.dataLabels.position?
16 | 1:0,E,q,G,x,r,C,t;e.getWidthAt=function(a){var b=p-w/2;return a>A||w===H?z:z+(n-z)*(1-(a-b)/(w-H))};e.getX=function(a,b,c){return m+(b?-1:1)*(e.getWidthAt(d?2*p-a:a)/2+c.labelDistance)};e.center=[m,p,w];e.centerX=m;f.forEach(function(a){h&&!1===a.visible||(b+=a.y)});f.forEach(function(a){t=null;F=b?a.y/b:0;q=p-w/2+y*w;r=q+F*w;v=e.getWidthAt(q);E=m-v/2;G=E+v;v=e.getWidthAt(r);x=m-v/2;C=x+v;q>A?(E=x=m-z/2,G=C=m+z/2):r>A&&(t=r,v=e.getWidthAt(A),x=m-v/2,C=x+v,r=A);d&&(q=2*p-q,r=2*p-r,null!==t&&(t=2*p-
17 | t));B=[["M",E,q],["L",G,q],["L",C,r]];null!==t&&B.push(["L",C,t],["L",x,t]);B.push(["L",x,r],["Z"]);a.shapeType="path";a.shapeArgs={d:B};a.percentage=100*F;a.plotX=m;a.plotY=(q+(t||r))/2;a.tooltipPos=[m,a.plotY];a.dlBox={x:x,y:q,topWidth:G-E,bottomWidth:C-x,height:Math.abs(I(t,r)-q),width:NaN};a.slice=J;a.half=K;h&&!1===a.visible||(y+=F)});L(e,"afterTranslate")};b.prototype.sortByAngle=function(a){a.sort(function(a,b){return a.plotY-b.plotY})};b.defaultOptions=B(c.defaultOptions,{animation:!1,center:["50%",
18 | "50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1,verticalAlign:"middle"},states:{select:{color:"#cccccc",borderColor:"#000000"}}});return b}(c);z(d.prototype,{animate:J});l(a,"afterHideAllOverlappingLabels",function(){this.series.forEach(function(a){var b=a.options&&a.options.dataLabels;A(b)&&(b=b[0]);a.is("pie")&&a.placeDataLabels&&b&&!b.inside&&a.placeDataLabels()})});f.registerSeriesType("funnel",d);"";return d});n(a,"Series/Pyramid/PyramidSeries.js",
19 | [a["Series/Funnel/FunnelSeries.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,l,f){var d=this&&this.__extends||function(){var a=function(d,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])};return a(d,c)};return function(d,c){function f(){this.constructor=d}a(d,c);d.prototype=null===c?Object.create(c):(f.prototype=c.prototype,new f)}}(),n=f.merge;f=function(f){function l(){var a=
20 | null!==f&&f.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}d(l,f);l.defaultOptions=n(a.defaultOptions,{neckWidth:"0%",neckHeight:"0%",reversed:!0});return l}(a);l.registerSeriesType("pyramid",f);"";return f});n(a,"masters/modules/funnel.src.js",[],function(){})});
21 | //# sourceMappingURL=funnel.js.map
--------------------------------------------------------------------------------
/charts/src/main/assets/AARounded-Corners.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Highcharts plugin for creating individual rounded corners.
3 | *
4 | * Author: Torstein Honsi
5 | * Version: 1.0.5
6 | * License: MIT License
7 | */
8 | (function(factory){if(typeof module==="object"&&module.exports){module.exports=factory}else{factory(Highcharts)}}(function(H){var rel=H.relativeLength;H.wrap(H.seriesTypes.column.prototype,"translate",function(proceed){var options=this.options,topMargin=options.topMargin||0,bottomMargin=options.bottomMargin||0;proceed.call(this);this.points.forEach(function(point){var shapeArgs=point.shapeArgs,w=shapeArgs.width,h=shapeArgs.height,x=shapeArgs.x,y=shapeArgs.y;var rTopLeft=rel(options.borderRadiusTopLeft||0,w),rTopRight=rel(options.borderRadiusTopRight||0,w),rBottomRight=rel(options.borderRadiusBottomRight||0,w),rBottomLeft=rel(options.borderRadiusBottomLeft||0,w);if(rTopLeft||rTopRight||rBottomRight||rBottomLeft){var maxR=Math.min(w,h)/2;if(rTopLeft>maxR){rTopLeft=maxR}if(rTopRight>maxR){rTopRight=maxR}if(rBottomRight>maxR){rBottomRight=maxR}if(rBottomLeft>maxR){rBottomLeft=maxR}point.dlBox=point.shapeArgs;point.shapeType="path";point.shapeArgs={d:[["M",x+rTopLeft,y+topMargin],["L",x+w-rTopRight,y+topMargin],["C",x+w-rTopRight/2,y,x+w,y+rTopRight/2,x+w,y+rTopRight],["L",x+w,y+h-rBottomRight],["C",x+w,y+h-rBottomRight/2,x+w-rBottomRight/2,y+h,x+w-rBottomRight,y+h+bottomMargin],["L",x+rBottomLeft,y+h+bottomMargin],["C",x+rBottomLeft/2,y+h,x,y+h-rBottomLeft/2,x,y+h-rBottomLeft],["L",x,y+rTopLeft],["C",x,y+rTopLeft/2,x+rTopLeft/2,y,x+rTopLeft,y],["Z"]]}}})})}));
9 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAAnimation.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAAnimation
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:14
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAnimationType
12 |
13 | class AAAnimation {
14 | var duration: Int? = null
15 | var easing: String? = null
16 |
17 | fun duration(prop: Int?): AAAnimation {
18 | duration = prop
19 | return this
20 | }
21 |
22 | fun easing(prop: AAChartAnimationType?): AAAnimation {
23 | easing = prop?.value
24 | return this
25 | }
26 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAAxis.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 | enum class AAChartAxisType(val value: String) {
4 | Linear("linear"),
5 | Logarithmic("logarithmic"),
6 | Datetime("datetime"),
7 | Category("category"),
8 | }
9 |
10 |
11 | open class AAAxis {
12 | var allowDecimals: Boolean? = null
13 | var alternateGridColor: Any? = null
14 | var crosshair: AACrosshair? = null //准星线样式设置
15 | var title: AATitle? = null
16 | var type: String? = null
17 | var dateTimeLabelFormats: AADateTimeLabelFormats? = null
18 | var plotBands: Array? = null
19 | var plotLines: Array? = null
20 | var categories: Array? = null
21 | var linkedTo: Int? = null
22 | var reversed: Boolean? = null
23 | var reversedStacks: Boolean? = null
24 | var opposite: Boolean? = null
25 | var lineWidth: Number? = null //坐标轴轴线宽度
26 | var lineColor: String? = null //坐标轴轴线线颜色
27 | var max: Number? = null //坐标轴最大值
28 | var min: Number? = null //坐标轴最小值(设置为0就不会有负数)
29 | var minRange: Int? = null
30 | var minTickInterval: Int? = null //The minimum tick interval allowed in axis values. For example on zooming in on an axis with daily data, this can be used to prevent the axis from showing hours. Defaults to the closest distance between two points on the axis.
31 | var minorTicks: Boolean? = null //是否显示副刻度
32 | var minorGridLineColor: String? = null //Color of the minor, secondary grid lines.
33 | var minorGridLineDashStyle: String? = null //The dash or dot style of the minor grid lines.
34 | var minorGridLineWidth: Number? = null //Width of the minor, secondary grid lines.
35 | var minorTickColor: String? = null //Color for the minor tick marks.
36 | var minorTickInterval: Any? = null /*Specific tick interval in axis units for the minor ticks. On a linear axis, if "auto", the minor tick interval is calculated as a fifth of the tickInterval. If null or undefined, minor ticks are not shown.
37 | On logarithmic axes, the unit is the power of the value. For example, setting the minorTickInterval to 1 puts one tick on each of 0.1, 1, 10, 100 etc. Setting the minorTickInterval to 0.1 produces 9 ticks between 1 and 10, 10 and 100 etc.
38 | If user settings dictate minor ticks to become too dense, they don't make sense, and will be ignored to prevent performance problems.*/
39 | var minorTickLength: Number? = null //The pixel length of the minor tick marks.
40 | var minorTickPosition: String? = null //The position of the minor tick marks relative to the axis line. Can be one of inside and outside. Defaults to outside.
41 | var minorTickWidth: Number? = null //The pixel width of the minor tick mark.
42 |
43 | var gridLineWidth: Number? = null //坐标轴网格线宽度
44 | var gridLineColor: String? = null //坐标轴网格线颜色
45 | var gridLineDashStyle: String? = null //坐标轴网格线样式
46 | var gridLineInterpolation: String? = null
47 | var offset: Number? = null //坐标轴垂直偏移
48 | var labels: AALabels? = null //用于设置坐标轴文字相关的
49 | var visible: Boolean? = null //用于设置坐标轴以及坐标轴文字是否显示
50 | var startOnTick: Boolean? = null //Whether to force the axis to start on a tick. Use this option with the maxPadding option to control the axis start.This option is always disabled, when panning type is either y or xy. Defaults to true.
51 | var endOnTick: Boolean? = null //Whether to force the axis to end on a tick. Use this option with the maxPadding option to control the axis end. This option is always disabled, when panning type is either y or xy. Defaults to true.
52 | var tickColor: String? = null //坐标轴轴线下方刻度线颜色
53 | var tickInterval: Number? = null //坐标轴刻度点间隔数(设置每隔几个点显示一个 坐标轴的内容:
54 | var tickmarkPlacement: String? = null //本参数只对分类轴有效。 当值为 on 时刻度线将在分类上方显示;当值为 between 时,刻度线将在两个分类中间显示。当 tickInterval 为 1 时,默认是 between,其他情况默认是 on。 默认是:null.
55 | var tickWidth: Number? = null //坐标轴刻度线的宽度,设置为 0 时则不显示刻度线
56 | var tickLength: Number? = null //坐标轴刻度线的长度。 默认是:10.
57 | var tickPosition: String? = null //刻度线相对于轴线的位置,可用的值有 inside 和 outside,分别表示在轴线的内部和外部。 默认是:outside.
58 | var tickPositions: Array? = null // Custom chart axis coordinates
59 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAChart.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAChart
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:49
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
12 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartZoomType
13 | import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
14 |
15 | class AAChart {
16 | var type: String? = null
17 | var backgroundColor: Any? = null
18 | var plotBackgroundImage: String? = null
19 | var pinchType: String? = null
20 | var panning: Boolean? = null
21 | var panKey: String? = null
22 | var polar: Boolean? = null
23 | var animation: Any? = null //AAAnimation | Boolean
24 | var inverted: Boolean? = null
25 |
26 | /*图表外边缘和绘图区域之间的边距。 数组中的数字分别表示顶部,右侧,底部和左侧 ([👆,👉,👇,👈])。
27 | 也可以使用 marginTop,marginRight,marginBottom 和 marginLeft 来设置某一个方向的边距*/
28 | var margin: Array? = null
29 | var marginTop: Number? = null//👆
30 | var marginRight: Number? = null//👉
31 | var marginBottom: Number? = null//👇
32 | var marginLeft: Number? = null//👈
33 | var scrollablePlotArea: AAScrollablePlotArea? = null
34 | var resetZoomButton: AAResetZoomButton? = null
35 | var zoomType: String? = null
36 | var events: AAChartEvents? = null
37 | var height: Number? = null
38 |
39 |
40 | fun type(prop: AAChartType?): AAChart {
41 | type = prop?.value
42 | return this
43 | }
44 |
45 | fun backgroundColor(prop: Any?): AAChart {
46 | backgroundColor = prop
47 | return this
48 | }
49 |
50 | fun plotBackgroundImage(prop: String): AAChart {
51 | plotBackgroundImage = prop
52 | return this
53 | }
54 |
55 | fun pinchType(prop: AAChartZoomType?): AAChart {
56 | pinchType = prop?.value
57 | return this
58 | }
59 |
60 | fun panning(prop: Boolean?): AAChart {
61 | panning = prop
62 | return this
63 | }
64 |
65 | fun panKey(prop: String): AAChart {
66 | panKey = prop
67 | return this
68 | }
69 |
70 | fun polar(prop: Boolean?): AAChart {
71 | polar = prop
72 | return this
73 | }
74 |
75 | fun animation(prop: Any): AAChart {
76 | animation = prop
77 | return this
78 | }
79 |
80 | fun inverted(prop: Boolean?): AAChart {
81 | inverted = prop
82 | return this
83 | }
84 |
85 | fun margin(prop: Array?): AAChart {
86 | margin = prop
87 | return this
88 | }
89 |
90 | fun marginTop(prop: Number): AAChart {
91 | marginTop = prop
92 | return this
93 | }
94 |
95 | fun marginRight(prop: Number): AAChart {
96 | marginRight = prop
97 | return this
98 | }
99 |
100 | fun marginBottom(prop: Number): AAChart {
101 | marginBottom = prop
102 | return this
103 | }
104 |
105 | fun marginLeft(prop: Number): AAChart {
106 | marginLeft = prop
107 | return this
108 | }
109 |
110 | fun scrollablePlotArea(prop: AAScrollablePlotArea?): AAChart {
111 | scrollablePlotArea = prop
112 | return this
113 | }
114 |
115 | fun resetZoomButton(prop: AAResetZoomButton): AAChart {
116 | resetZoomButton = prop
117 | return this
118 | }
119 |
120 | fun zoomType(zoomType: String?): AAChart {
121 | this.zoomType = zoomType
122 | return this
123 | }
124 |
125 | fun events(events: AAChartEvents?): AAChart {
126 | this.events = events
127 | return this
128 | }
129 |
130 | fun height(height: Number?): AAChart {
131 | this.height = height
132 | return this
133 | }
134 |
135 | }
136 |
137 |
138 | class AAResetZoomButton {
139 | var position: AAPosition? = null
140 | var relativeTo: String? = null
141 | var theme: Map? = null
142 | fun position(prop: AAPosition?): AAResetZoomButton {
143 | position = prop
144 | return this
145 | }
146 |
147 | fun relativeTo(prop: String?): AAResetZoomButton {
148 | relativeTo = prop
149 | return this
150 | }
151 |
152 | fun theme(prop: Map?): AAResetZoomButton {
153 | theme = prop
154 | return this
155 | }
156 | }
157 |
158 |
159 | class AAChartEvents {
160 | var load: String? = null
161 | var redraw: String? = null
162 | var render: String? = null
163 | var selection: String? = null
164 |
165 | fun load(prop: String): AAChartEvents {
166 | load = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
167 | return this
168 | }
169 |
170 | fun redraw(prop: String): AAChartEvents {
171 | redraw = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
172 | return this
173 | }
174 |
175 | fun render(prop: String): AAChartEvents {
176 | render = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
177 | return this
178 | }
179 |
180 | fun selection(prop: String): AAChartEvents {
181 | selection = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
182 | return this
183 | }
184 |
185 | }
186 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AACredits.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2021
3 | * FileName: AACredits
4 | * Author: AnAn
5 | * Date: 2021/1/26 10:55 AM
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel;
10 |
11 |
12 | class AACredits {
13 | var enabled: Boolean? = null
14 | var href: String? = null
15 | var position: AAPosition? = null
16 | var style: AAStyle? = null
17 | var text: String? = null
18 | fun enabled(prop: Boolean): AACredits {
19 | enabled = prop
20 | return this
21 | }
22 |
23 | fun href(prop: String?): AACredits {
24 | href = prop
25 | return this
26 | }
27 |
28 | fun position(prop: AAPosition?): AACredits {
29 | position = prop
30 | return this
31 | }
32 |
33 | fun style(prop: AAStyle?): AACredits {
34 | style = prop
35 | return this
36 | }
37 |
38 | fun text(prop: String?): AACredits {
39 | text = prop
40 | return this
41 | }
42 | }
43 |
44 |
45 | class AAPosition {
46 | var align: String? = null
47 | var verticalAlign: String? = null
48 | var x: Number? = null
49 | var y: Number? = null
50 | fun align(prop: String?): AAPosition {
51 | align = prop
52 | return this
53 | }
54 |
55 | fun verticalAlign(prop: String?): AAPosition {
56 | verticalAlign = prop
57 | return this
58 | }
59 |
60 | fun align(prop: Number?): AAPosition {
61 | x = prop
62 | return this
63 | }
64 |
65 | fun y(prop: Number?): AAPosition {
66 | y = prop
67 | return this
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AACrosshair.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AACrosshair
4 | * Author: ios-fn
5 | * Date: 2019-06-16 19:19
6 | * Description:
7 | * History:
8 | */
9 | /**
10 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
11 | * ◉◉◉................................................... ◉◉◉
12 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
13 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
14 | * ◉◉◉................................................... ◉◉◉
15 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
16 | */
17 |
18 | /**
19 |
20 | * -------------------------------------------------------------------------------
21 | *
22 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
23 | *
24 | * Please contact me on GitHub,if there are any problems encountered in use.
25 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
26 | * -------------------------------------------------------------------------------
27 | * And if you want to contribute for this project, please contact me as well
28 | * GitHub : https://github.com/AAChartModel
29 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
30 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
31 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
32 | *
33 | * -------------------------------------------------------------------------------
34 |
35 | */
36 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
37 |
38 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLineDashStyleType
39 |
40 | class AACrosshair {
41 | var width: Number? = null
42 | var color: String? = null
43 | var dashStyle: AAChartLineDashStyleType? = null
44 |
45 | fun width(prop: Number?): AACrosshair {
46 | width = prop
47 | return this
48 | }
49 |
50 | fun color(prop: String): AACrosshair {
51 | color = prop
52 | return this
53 | }
54 |
55 | fun dashStyle(prop: AAChartLineDashStyleType): AACrosshair {
56 | dashStyle = prop
57 | return this
58 | }
59 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AADataLabels.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AADataLabels
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:35
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
12 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
13 | import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
14 |
15 | class AADataLabels {
16 | var enabled: Boolean? = null
17 | var align: String? = null
18 | var inside: Boolean? = null
19 | var style: AAStyle? = null
20 | var format: String? = null
21 | var formatter: String? = null
22 | var rotation: Number? = null
23 | var allowOverlap: Boolean? = null
24 | var useHTML: Boolean? = null
25 | var distance: Number? = null
26 | var verticalAlign: String? = null
27 | var x: Number? = null
28 | var y: Number? = null
29 | var color: String? = null
30 | var backgroundColor: String? = null
31 | var borderColor: String? = null
32 | var borderRadius: Number? = null
33 | var borderWidth: Number? = null
34 | var shape: String? = null
35 | var crop: Boolean? = null
36 | var overflow: String? = null
37 | var softConnector: Boolean? = null
38 | var textPath: Any? = null
39 | var filter: Any? = null
40 |
41 | fun enabled(prop: Boolean?): AADataLabels {
42 | enabled = prop
43 | return this
44 | }
45 |
46 | fun align(prop: AAChartAlignType?): AADataLabels {
47 | align = prop?.value
48 | return this
49 | }
50 |
51 | fun inside(prop: Boolean?): AADataLabels {
52 | inside = prop
53 | return this
54 | }
55 |
56 |
57 | fun style(prop: AAStyle?): AADataLabels {
58 | style = prop
59 | return this
60 | }
61 |
62 | fun format(prop: String?): AADataLabels {
63 | format = prop
64 | return this
65 | }
66 |
67 | fun formatter(prop: String?): AADataLabels {
68 | formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
69 | return this
70 | }
71 |
72 | fun rotation(prop: Number?): AADataLabels {
73 | rotation = prop
74 | return this
75 | }
76 |
77 | fun allowOverlap(prop: Boolean?): AADataLabels {
78 | allowOverlap = prop
79 | return this
80 | }
81 |
82 | fun useHTML(prop: Boolean?): AADataLabels {
83 | useHTML = prop
84 | return this
85 | }
86 |
87 | fun distance(prop: Number?): AADataLabels {
88 | distance = prop
89 | return this
90 | }
91 |
92 | fun verticalAlign(prop: AAChartVerticalAlignType?): AADataLabels {
93 | verticalAlign = prop?.value
94 | return this
95 | }
96 |
97 | fun x(prop: Number?): AADataLabels {
98 | x = prop
99 | return this
100 | }
101 |
102 | fun y(prop: Number?): AADataLabels {
103 | y = prop
104 | return this
105 | }
106 |
107 | fun color(prop: String?): AADataLabels {
108 | color = prop
109 | return this
110 | }
111 |
112 | fun backgroundColor(prop: String?): AADataLabels {
113 | backgroundColor = prop
114 | return this
115 | }
116 |
117 | fun borderColor(prop: String?): AADataLabels {
118 | borderColor = prop
119 | return this
120 | }
121 |
122 | fun borderRadius(prop: Number?): AADataLabels {
123 | borderRadius = prop
124 | return this
125 | }
126 |
127 | fun borderWidth(prop: Number?): AADataLabels {
128 | borderWidth = prop
129 | return this
130 | }
131 |
132 | fun shape(prop: String?): AADataLabels {
133 | shape = prop
134 | return this
135 | }
136 |
137 | fun crop(prop: Boolean?): AADataLabels {
138 | crop = prop
139 | return this
140 | }
141 |
142 | fun overflow(prop: String?): AADataLabels {
143 | overflow = prop
144 | return this
145 | }
146 |
147 | fun softConnector(prop: Boolean?): AADataLabels {
148 | softConnector = prop
149 | return this
150 | }
151 |
152 | fun textPath(prop: Any?): AADataLabels {
153 | textPath = prop
154 | return this
155 | }
156 |
157 | fun filter(prop: Any?): AADataLabels {
158 | filter = prop
159 | return this
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AADateTimeLabelFormats.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 | class AADateTimeLabelFormats {
4 | var millisecond: String? = null
5 | var second: String? = null
6 | var minute: String? = null
7 | var hour: String? = null
8 | var day: String? = null
9 | var week: String? = null
10 | var month: String? = null
11 | var year: String? = null
12 |
13 | fun millisecond(prop: String?): AADateTimeLabelFormats {
14 | millisecond = prop
15 | return this
16 | }
17 |
18 | fun second(prop: String?): AADateTimeLabelFormats {
19 | second = prop
20 | return this
21 | }
22 |
23 | fun minute(prop: String?): AADateTimeLabelFormats {
24 | minute = prop
25 | return this
26 | }
27 |
28 | fun hour(prop: String?): AADateTimeLabelFormats {
29 | hour = prop
30 | return this
31 | }
32 |
33 | fun day(prop: String?): AADateTimeLabelFormats {
34 | day = prop
35 | return this
36 | }
37 |
38 | fun week(prop: String?): AADateTimeLabelFormats {
39 | week = prop
40 | return this
41 | }
42 |
43 | fun month(prop: String?): AADateTimeLabelFormats {
44 | month = prop
45 | return this
46 | }
47 |
48 | fun year(prop: String?): AADateTimeLabelFormats {
49 | year = prop
50 | return this
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AALabel.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AALabel
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:19
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
12 | import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
13 |
14 | class AALabel {
15 | var align: String? = null //标签的对齐方式,可用的值有 "left"、"center" 及 "right"。默认值是根据坐标轴的位置(在图表中的位置)即标签的旋转角度进行智能判断的。 默认是:center.
16 | var rotation: Number? = null //标签的旋转角度 默认是:0.
17 | var text: String? = null //文字
18 | var textAlign: String? = null //文字对齐
19 | var useHTML: Boolean? = null //HTML渲染
20 | var verticalAlign: String? = null //竖直对齐
21 | var style: Any? = null //轴标签的 CSS 样式
22 | var x: Number? = null //水平偏移
23 | var y: Number? = null // 竖直偏移
24 | var format: String? = null //格式化标签文本
25 | var formatter: String? = null //格式化标签文本
26 |
27 |
28 | fun align(prop: String?): AALabel {
29 | align = prop
30 | return this
31 | }
32 |
33 | fun rotation(prop: Number?): AALabel {
34 | rotation = prop
35 | return this
36 | }
37 |
38 | fun text(prop: String?): AALabel {
39 | text = prop
40 | return this
41 | }
42 |
43 | fun textAlign(prop: AAChartAlignType?): AALabel {
44 | textAlign = prop?.value
45 | return this
46 | }
47 |
48 | fun useHTML(prop: Boolean?): AALabel {
49 | useHTML = prop
50 | return this
51 | }
52 |
53 | fun verticalAlign(prop: String?): AALabel {
54 | verticalAlign = prop
55 | return this
56 | }
57 |
58 | fun style(prop: Any?): AALabel {
59 | style = prop
60 | return this
61 | }
62 |
63 | fun x(prop: Number?): AALabel {
64 | x = prop
65 | return this
66 | }
67 |
68 | fun y(prop: Number?): AALabel {
69 | y = prop
70 | return this
71 | }
72 |
73 | fun format(prop: String?): AALabel {
74 | format = prop
75 | return this
76 | }
77 |
78 | fun formatter(prop: String?): AALabel {
79 | formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
80 | return this
81 | }
82 |
83 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AALabels.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AALabels
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:23
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
12 | import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
13 |
14 |
15 | class AALabels {
16 | var align: String? =
17 | null//轴标签的对齐方式,可用的值有 "left"、"center" 及 "right"。默认值是根据坐标轴的位置(在图表中的位置)即标签的旋转角度进行智能判断的。 默认是:center.
18 | var autoRotation: Any? =
19 | null //只针对水平轴有效,允许在防止轴标签重叠时自动旋转轴标签的角度。当空间足够时,轴标签不会被旋转。当图表变小时(主要是宽度变小) ,轴标签开始旋转对应的角度,然后会依次删除间隔的轴标签并尝试旋转数组中的角度。可以通过将此参数设置为 false 来关闭轴标签旋转(这将导致标签自动换行)。 默认是:[-45].
20 | var autoRotationLimit: Number? =
21 | null//当每个分类的宽度比该参数的值大很多(像素)时,轴标签将不会被自动旋转,而是以换行的形式展示轴标签。 当轴标签包含多个短词时换行展示轴标签可以使得轴标签有足够的空间,所以设置合理的自动旋转下限是非常有意义的。 默认是:80.
22 | var distance: Number? = null//只针对极地图有效,定义周标签与绘图区边缘的距离。 默认是:15.
23 | var enabled: Boolean? = null//是否显示坐标轴标签 默认是:true.
24 | var format: String? = null//坐标轴格式化字符串。 默认是:{value}.
25 | var formatter: String? = null//坐标轴格式化字符串。 默认是:{value}.
26 | var padding: Number? = null//轴标签的内间距,作用是保证轴标签之间有空隙。 默认是:5.
27 | var rotation: Number? = null//轴标签的旋转角度 默认是:0.
28 | var staggerLines: Int? = null//只针对水平轴有效,定义轴标签显示行数。
29 | var step: Int? =
30 | null//显示 n 的倍数标签,例如设置为 2 则表示标签间隔一个轴标签显示。默认情况下,为了避免轴标签被覆盖,该参数会根据情况自动计算。可以通过设置此参数为 1 来阻止自动计算。
31 | var style: AAStyle? = null//轴标签的 CSS 样式
32 | var x: Number? = null//相对于坐标轴刻度线的水平偏移。 默认是:0.
33 | var y: Number? = null//相对于坐标轴刻度线的垂直平偏移。 默认是:null.
34 | var useHTML: Boolean? = null//HTML渲染
35 |
36 | fun align(prop: AAChartAlignType): AALabels {
37 | align = prop.value
38 | return this
39 | }
40 |
41 | fun autoRotation(prop: Any): AALabels {
42 | autoRotation = prop
43 | return this
44 | }
45 |
46 | fun autoRotationLimit(prop: Number?): AALabels {
47 | autoRotationLimit = prop
48 | return this
49 | }
50 |
51 | fun distance(prop: Number?): AALabels {
52 | distance = prop
53 | return this
54 | }
55 |
56 | fun enabled(prop: Boolean?): AALabels {
57 | enabled = prop
58 | return this
59 | }
60 |
61 | fun format(prop: String): AALabels {
62 | format = prop
63 | return this
64 | }
65 |
66 | fun formatter(prop: String): AALabels {
67 | formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
68 | return this
69 | }
70 |
71 | fun padding(prop: Number?): AALabels {
72 | padding = prop
73 | return this
74 | }
75 |
76 | fun rotation(prop: Number?): AALabels {
77 | rotation = prop
78 | return this
79 | }
80 |
81 | fun staggerLines(prop: Int?): AALabels {
82 | staggerLines = prop
83 | return this
84 | }
85 |
86 | fun step(prop: Int?): AALabels {
87 | step = prop
88 | return this
89 | }
90 |
91 | fun style(prop: AAStyle): AALabels {
92 | style = prop
93 | return this
94 | }
95 |
96 | fun x(prop: Number?): AALabels {
97 | x = prop
98 | return this
99 | }
100 |
101 | fun y(prop: Number?): AALabels {
102 | y = prop
103 | return this
104 | }
105 |
106 | fun useHTML(prop: Boolean?): AALabels {
107 | useHTML = prop
108 | return this
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AALang.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAChart
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:49
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | class AALang {
12 | var resetZoom: String? = null
13 | var thousandsSep: String? = null
14 |
15 | fun resetZoom(prop: String?): AALang {
16 | resetZoom = prop
17 | return this
18 | }
19 |
20 | fun thousandsSep(prop: String?): AALang {
21 | thousandsSep = prop
22 | return this
23 | }
24 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AALegend.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AALegend
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:48
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
12 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartFontWeightType
13 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLayoutType
14 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
15 |
16 | class AALegend {
17 | var layout: String? =
18 | null //图例数据项的布局。布局类型: "horizontal" 或 "vertical" 即水平布局和垂直布局 默认是:horizontal.
19 | var align: String? = null //设定图例在图表区中的水平对齐方式,合法值有left,center 和 right。
20 | var verticalAlign: String? =
21 | null //设定图例在图表区中的垂直对齐方式,合法值有 top,middle 和 bottom。垂直位置可以通过 y 选项做进一步设定。
22 | var enabled: Boolean? = null
23 | var borderColor: String? = null
24 | var borderWidth: Number? = null
25 | var itemMarginTop: Number? = null //图例的每一项的顶部外边距,单位px。 默认是:0.
26 | var itemStyle: AAItemStyle? = null
27 | var x: Number? = null
28 | var y: Number? = null
29 | var floating: Boolean? = null
30 | var labelFormat: String? = null
31 |
32 | fun layout(prop: AAChartLayoutType): AALegend {
33 | layout = prop.value
34 | return this
35 | }
36 |
37 | fun align(prop: AAChartAlignType): AALegend {
38 | align = prop.value
39 | return this
40 | }
41 |
42 | fun verticalAlign(prop: AAChartVerticalAlignType): AALegend {
43 | verticalAlign = prop.value
44 | return this
45 | }
46 |
47 | fun enabled(prop: Boolean?): AALegend {
48 | enabled = prop
49 | return this
50 | }
51 |
52 | fun borderColor(prop: String): AALegend {
53 | borderColor = prop
54 | return this
55 | }
56 |
57 | fun borderWidth(prop: Number?): AALegend {
58 | borderWidth = prop
59 | return this
60 | }
61 |
62 | fun itemMarginTop(prop: Number?): AALegend {
63 | itemMarginTop = prop
64 | return this
65 | }
66 |
67 | fun itemStyle(prop: AAItemStyle): AALegend {
68 | itemStyle = prop
69 | return this
70 | }
71 |
72 | fun x(prop: Number?): AALegend {
73 | x = prop
74 | return this
75 | }
76 |
77 | fun y(prop: Number?): AALegend {
78 | y = prop
79 | return this
80 | }
81 |
82 | fun floating(prop: Boolean?): AALegend {
83 | floating = prop
84 | return this
85 | }
86 |
87 | fun labelFormat(prop: String?): AALegend {
88 | labelFormat = prop
89 | return this
90 | }
91 |
92 |
93 | }
94 |
95 | class AAItemStyle {
96 | var color: String? = null
97 | var cursor: String? = null
98 | var pointer: String? = null
99 | var fontSize: String? = null
100 | var fontWeight: String? = null
101 |
102 |
103 | fun color(prop: String?): AAItemStyle {
104 | color = prop
105 | return this
106 | }
107 |
108 | fun cursor(prop: String): AAItemStyle {
109 | cursor = prop
110 | return this
111 | }
112 |
113 | fun pointer(prop: String): AAItemStyle {
114 | pointer = prop
115 | return this
116 | }
117 |
118 | fun fontSize(prop: Number?): AAItemStyle {
119 | prop?.let {
120 | fontSize = "${prop}px"
121 | }
122 | return this
123 | }
124 |
125 | fun fontWeight(prop: AAChartFontWeightType?): AAItemStyle {
126 | fontWeight = prop?.value
127 | return this
128 | }
129 |
130 | }
131 |
132 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AALine.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 |
4 | open class AALine {
5 | var dataLabels: AADataLabels? = null
6 |
7 | fun dataLabels(prop: AADataLabels): AALine {
8 | dataLabels = prop
9 | return this
10 | }
11 | }
12 |
13 |
14 | open class AASpline {
15 | var dataLabels: AADataLabels? = null
16 |
17 | fun dataLabels(prop: AADataLabels): AASpline {
18 | dataLabels = prop
19 | return this
20 | }
21 | }
22 |
23 |
24 | open class AAArea {
25 | var dataLabels: AADataLabels? = null
26 |
27 | fun dataLabels(prop: AADataLabels): AAArea {
28 | dataLabels = prop
29 | return this
30 | }
31 | }
32 |
33 |
34 | open class AAAreaspline {
35 | var dataLabels: AADataLabels? = null
36 |
37 | fun dataLabels(prop: AADataLabels): AAAreaspline {
38 | dataLabels = prop
39 | return this
40 | }
41 | }
42 |
43 |
44 | open class AAArearange {
45 | var dataLabels: AADataLabels? = null
46 |
47 | fun dataLabels(prop: AADataLabels): AAArearange {
48 | dataLabels = prop
49 | return this
50 | }
51 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAMarker.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAMarker
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:33
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | open class AAMarker {
12 | var enabled: Boolean? = null
13 | var radius: Number? = null
14 | var symbol: String? = null
15 | var fillColor: String? = null//点的填充色(用来设置折线连接点的填充色)
16 | var lineWidth: Number? = null//外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
17 | var lineColor: Any? = null//外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色。)
18 | var states: AAMarkerStates? = null
19 |
20 | fun enabled(prop: Boolean): AAMarker {
21 | enabled = prop
22 | return this
23 | }
24 |
25 | fun radius(prop: Number?): AAMarker {
26 | radius = prop
27 | return this
28 | }
29 |
30 | fun symbol(prop: String?): AAMarker {
31 | symbol = prop
32 | return this
33 | }
34 |
35 | fun fillColor(prop: String): AAMarker {
36 | fillColor = prop
37 | return this
38 | }
39 |
40 | fun lineWidth(prop: Number?): AAMarker {
41 | lineWidth = prop
42 | return this
43 | }
44 |
45 | fun lineColor(prop: Any?): AAMarker {
46 | lineColor = prop
47 | return this
48 | }
49 |
50 | fun states(prop: AAMarkerStates): AAMarker? {
51 | states = prop
52 | return this
53 | }
54 | }
55 |
56 | open class AAMarkerStates {
57 | var hover: AAMarkerHover? = null
58 |
59 | fun hover(prop: AAMarkerHover?): AAMarkerStates {
60 | hover = prop
61 | return this
62 | }
63 | }
64 |
65 | open class AAMarkerHover {
66 | var enabled: Boolean? = null
67 | var fillColor: String? = null
68 | var lineColor: String? = null
69 | var lineWidth: Number? = null
70 | var lineWidthPlus: Number? = null
71 | var radius: Number? = null
72 | var radiusPlus: Number? = null
73 |
74 |
75 | fun enabled(prop: Boolean?): AAMarkerHover {
76 | enabled = prop
77 | return this
78 | }
79 |
80 | fun fillColor(prop: String?): AAMarkerHover {
81 | fillColor = prop
82 | return this
83 | }
84 |
85 | fun lineColor(prop: String?): AAMarkerHover {
86 | lineColor = prop
87 | return this
88 | }
89 |
90 | fun lineWidth(prop: Number?): AAMarkerHover {
91 | lineWidth = prop
92 | return this
93 | }
94 |
95 | fun lineWidthPlus(prop: Number?): AAMarkerHover {
96 | lineWidthPlus = prop
97 | return this
98 | }
99 |
100 | fun radius(prop: Number?): AAMarkerHover {
101 | radius = prop
102 | return this
103 | }
104 |
105 | fun radiusPlus(prop: Number?): AAMarkerHover {
106 | radiusPlus = prop
107 | return this
108 | }
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAPane.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 | class AAPane {
4 | var background: AABackground? = null
5 | var center: Array? = null
6 | var endAngle: Number? = null
7 | var size: Number? = null
8 | var startAngle: Number? = null
9 | fun background(prop: AABackground?): AAPane {
10 | background = prop
11 | return this
12 | }
13 |
14 | fun center(prop: Array): AAPane {
15 | center = prop
16 | return this
17 | }
18 |
19 | fun endAngle(prop: Number?): AAPane {
20 | endAngle = prop
21 | return this
22 | }
23 |
24 | fun size(prop: Number?): AAPane {
25 | size = prop
26 | return this
27 | }
28 |
29 | fun startAngle(prop: Number?): AAPane {
30 | startAngle = prop
31 | return this
32 | }
33 | }
34 |
35 | class AABackground {
36 | var backgroundColor: Any? = null
37 | var borderColor: String? = null
38 | var borderWidth: Number? = null
39 | var className: String? = null
40 | var innerRadius: Number? = null
41 | var outerRadius: Number? = null
42 | var shape: String? = null
43 | fun backgroundColor(prop: Any?): AABackground {
44 | backgroundColor = prop
45 | return this
46 | }
47 |
48 | fun borderColor(prop: String?): AABackground {
49 | borderColor = prop
50 | return this
51 | }
52 |
53 | fun borderWidth(prop: Number?): AABackground {
54 | borderWidth = prop
55 | return this
56 | }
57 |
58 | fun className(prop: String?): AABackground {
59 | className = prop
60 | return this
61 | }
62 |
63 | fun innerRadius(prop: Number?): AABackground {
64 | innerRadius = prop
65 | return this
66 | }
67 |
68 | fun outerRadius(prop: Number?): AABackground {
69 | outerRadius = prop
70 | return this
71 | }
72 |
73 | fun shape(prop: String?): AABackground {
74 | shape = prop
75 | return this
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAPie.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
4 |
5 | open class AAPie {
6 | var type: String? = null
7 | var dataLabels: AADataLabels? = null
8 | var size: Number? = null
9 | var allowPointSelect: Boolean? = null
10 | var cursor: String? = null
11 | var showInLegend: Boolean? = null
12 | var startAngle: Number? = null
13 | var endAngle: Number? = null
14 | var depth: Number? = null
15 | var center: Any? = null
16 | var data: Array? = null
17 |
18 |
19 | fun type(prop: AAChartType?): AAPie {
20 | type = prop?.value
21 | return this
22 | }
23 |
24 | fun dataLabels(prop: AADataLabels): AAPie {
25 | dataLabels = prop
26 | return this
27 | }
28 |
29 | fun size(prop: Number?): AAPie {
30 | size = prop
31 | return this
32 | }
33 |
34 | fun allowPointSelect(prop: Boolean?): AAPie {
35 | allowPointSelect = prop
36 | return this
37 | }
38 |
39 | fun cursor(prop: String): AAPie {
40 | cursor = prop
41 | return this
42 | }
43 |
44 | fun showInLegend(prop: Boolean?): AAPie {
45 | showInLegend = prop
46 | return this
47 | }
48 |
49 | fun startAngle(prop: Number?): AAPie {
50 | startAngle = prop
51 | return this
52 | }
53 |
54 | fun endAngle(prop: Number?): AAPie {
55 | endAngle = prop
56 | return this
57 | }
58 |
59 | fun depth(prop: Number?): AAPie {
60 | depth = prop
61 | return this
62 | }
63 |
64 | fun center(prop: Any?): AAPie {
65 | center = prop
66 | return this
67 | }
68 |
69 | fun data(prop: Array): AAPie {
70 | data = prop
71 | return this
72 | }
73 |
74 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAPlotBandsElement.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAPlotBandsElement
4 | * Author: ios-fn
5 | * Date: 2019-06-16 18:58
6 | * Description:
7 | * History:
8 | */
9 | /**
10 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
11 | * ◉◉◉................................................... ◉◉◉
12 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
13 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
14 | * ◉◉◉................................................... ◉◉◉
15 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
16 | */
17 |
18 | /**
19 |
20 | * -------------------------------------------------------------------------------
21 | *
22 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
23 | *
24 | * Please contact me on GitHub,if there are any problems encountered in use.
25 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
26 | * -------------------------------------------------------------------------------
27 | * And if you want to contribute for this project, please contact me as well
28 | * GitHub : https://github.com/AAChartModel
29 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
30 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
31 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
32 | *
33 | * -------------------------------------------------------------------------------
34 |
35 | */
36 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
37 |
38 | class AAPlotBandsElement {
39 | private var from: Number? = null
40 | private var to: Number? = null
41 | private var color: Any? = null
42 | private var borderColor: String? = null
43 | private var borderWidth: Number? = null
44 | private var className: String? = null
45 | private var label: AALabel? = null
46 | private var index: Int? = null
47 |
48 | fun from(prop: Number?): AAPlotBandsElement {
49 | from = prop
50 | return this
51 | }
52 |
53 | fun to(prop: Number?): AAPlotBandsElement {
54 | to = prop
55 | return this
56 | }
57 |
58 |
59 | fun color(prop: Any): AAPlotBandsElement {
60 | color = prop
61 | return this
62 | }
63 |
64 | fun borderColor(prop: String): AAPlotBandsElement {
65 | borderColor = prop
66 | return this
67 | }
68 |
69 | fun borderWidth(prop: Number?): AAPlotBandsElement {
70 | borderWidth = prop
71 | return this
72 | }
73 |
74 | fun className(prop: String): AAPlotBandsElement {
75 | className = prop
76 | return this
77 | }
78 |
79 | fun label(prop: AALabel): AAPlotBandsElement {
80 | label = prop
81 | return this
82 | }
83 |
84 | fun index(prop: Int?): AAPlotBandsElement {
85 | index = prop
86 | return this
87 | }
88 |
89 | }
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAPlotLinesElement.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAPlotLinesElement
4 | * Author: ios-fn
5 | * Date: 2019-06-16 19:00
6 | * Description:
7 | * History:
8 | */
9 | /**
10 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
11 | * ◉◉◉................................................... ◉◉◉
12 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
13 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
14 | * ◉◉◉................................................... ◉◉◉
15 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
16 | */
17 |
18 | /**
19 |
20 | * -------------------------------------------------------------------------------
21 | *
22 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
23 | *
24 | * Please contact me on GitHub,if there are any problems encountered in use.
25 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
26 | * -------------------------------------------------------------------------------
27 | * And if you want to contribute for this project, please contact me as well
28 | * GitHub : https://github.com/AAChartModel
29 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
30 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
31 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
32 | *
33 | * -------------------------------------------------------------------------------
34 |
35 | */
36 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
37 |
38 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLineDashStyleType
39 |
40 |
41 | class AAPlotLinesElement {
42 |
43 | private var color: Any? = null
44 | private var dashStyle: String? = null
45 | private var width: Number? = null
46 | private var value: Number? = null
47 | private var zIndex: Int? = null
48 | private var label: AALabel? = null
49 |
50 | fun color(prop: Any): AAPlotLinesElement {
51 | color = prop
52 | return this
53 | }
54 |
55 | fun dashStyle(prop: AAChartLineDashStyleType): AAPlotLinesElement {
56 | dashStyle = prop.value
57 | return this
58 | }
59 |
60 | fun width(prop: Number?): AAPlotLinesElement {
61 | width = prop
62 | return this
63 | }
64 |
65 | fun value(prop: Number?): AAPlotLinesElement {
66 | value = prop
67 | return this
68 | }
69 |
70 | fun zIndex(prop: Int?): AAPlotLinesElement {
71 | zIndex = prop
72 | return this
73 | }
74 |
75 | fun label(prop: AALabel): AAPlotLinesElement {
76 | label = prop
77 | return this
78 | }
79 |
80 |
81 | }
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAPlotOptions.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAPlotOptions
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:33
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | open class AAPlotOptions {
12 | var column: AAColumn? = null
13 | var bar: AABar? = null
14 | var line: AALine? = null
15 | var spline: AASpline? = null
16 | var area: AAArea? = null
17 | var areaspline: AAAreaspline? = null
18 | var pie: AAPie? = null
19 | var columnrange: Any? = null
20 | var arearange: Any? = null
21 | var series: AASeries? = null
22 | var scatter: AAScatter? = null
23 |
24 | fun column(prop: AAColumn): AAPlotOptions {
25 | column = prop
26 | return this
27 | }
28 |
29 | fun line(prop: AALine): AAPlotOptions {
30 | line = prop
31 | return this
32 | }
33 |
34 | fun pie(prop: AAPie): AAPlotOptions {
35 | pie = prop
36 | return this
37 | }
38 |
39 | fun bar(prop: AABar): AAPlotOptions {
40 | bar = prop
41 | return this
42 | }
43 |
44 | fun spline(prop: AASpline): AAPlotOptions {
45 | spline = prop
46 | return this
47 | }
48 |
49 | fun area(prop: AAArea): AAPlotOptions {
50 | area = prop
51 | return this
52 | }
53 |
54 | fun areaspline(prop: AAAreaspline): AAPlotOptions {
55 | areaspline = prop
56 | return this
57 | }
58 |
59 | fun columnrange(prop: Any): AAPlotOptions {
60 | columnrange = prop
61 | return this
62 | }
63 |
64 | fun arearange(prop: Any): AAPlotOptions {
65 | arearange = prop
66 | return this
67 | }
68 |
69 | fun series(prop: AASeries): AAPlotOptions {
70 | series = prop
71 | return this
72 | }
73 |
74 | fun scatter(prop: AAScatter): AAPlotOptions {
75 | scatter = prop
76 | return this
77 | }
78 | }
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAScatter.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLineDashStyleType
4 |
5 | open class AAScatter {
6 | var lineWidth: Number? = null
7 | var lineColor: String? = null
8 | var dashStyle: String? = null
9 | var enableMouseTracking: Any? = null
10 | var linkedTo: String? = null
11 | var states: AAStates? = null
12 | var marker: AAMarker? = null
13 | fun lineWidth(prop: Number?): AAScatter {
14 | lineWidth = prop
15 | return this
16 | }
17 |
18 | fun lineColor(prop: String?): AAScatter {
19 | lineColor = prop
20 | return this
21 | }
22 |
23 | fun dashStyle(prop: AAChartLineDashStyleType?): AAScatter {
24 | dashStyle = prop?.value
25 | return this
26 | }
27 |
28 | fun enableMouseTracking(prop: Any?): AAScatter {
29 | enableMouseTracking = prop
30 | return this
31 | }
32 |
33 | fun linkedTo(prop: String?): AAScatter {
34 | linkedTo = prop
35 | return this
36 | }
37 |
38 | fun states(prop: AAStates?): AAScatter {
39 | states = prop
40 | return this
41 | }
42 |
43 | fun marker(prop: AAMarker?): AAScatter {
44 | marker = prop
45 | return this
46 | }
47 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAScrollablePlotArea.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 | class AAScrollablePlotArea {
4 | var minHeight: Number? = null
5 | var minWidth: Number? = null
6 | var opacity: Float? = null
7 | var scrollPositionX: Number? = null
8 | var scrollPositionY: Number? = null
9 |
10 |
11 | fun minHeight(prop: Number?): AAScrollablePlotArea {
12 | minHeight = prop
13 | return this
14 | }
15 |
16 | fun minWidth(prop: Number?): AAScrollablePlotArea {
17 | minWidth = prop
18 | return this
19 | }
20 |
21 | fun opacity(prop: Float?): AAScrollablePlotArea {
22 | opacity = prop
23 | return this
24 | }
25 |
26 | fun scrollPositionX(prop: Number?): AAScrollablePlotArea {
27 | scrollPositionX = prop
28 | return this
29 | }
30 |
31 | fun scrollPositionY(prop: Number?): AAScrollablePlotArea {
32 | scrollPositionY = prop
33 | return this
34 | }
35 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AASeries.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AASeries
4 | * Author: ios-fn
5 | * Date: 2019-08-30 11:32
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartStackingType
12 | import com.github.aachartmodel.aainfographics.aachartcreator.AAShadow
13 | import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
14 |
15 | class AASeries {
16 | var borderColor //The border color, It is only valid for column, bar, pie, columnrange, pyramid and funnel chart types
17 | : String? = null
18 | var borderWidth //The border width, It is only valid for column, bar, pie, columnrange, pyramid and funnel chart types
19 | : Number? = null
20 | var borderRadius //The corner radius of the border surrounding each column or bar.
21 | : Number? = null
22 | var borderRadiusTopLeft: Any? = null
23 | var borderRadiusTopRight: Any? = null
24 | var borderRadiusBottomLeft: Any? = null
25 | var borderRadiusBottomRight: Any? = null
26 | var marker: AAMarker? = null
27 | var stacking: String? = null
28 | var animation: AAAnimation? = null
29 | var keys: Array? = null
30 | var colorByPoint: Boolean? = null//决定了图表是否给每个数据列或每个点分配一个颜色,默认值是 false, 即默认是给每个数据类分配颜色,
31 | var connectNulls: Boolean? = null//设置折线是否断点重连
32 | var events: AASeriesEvents? = null
33 | var shadow: AAShadow? = null
34 | var dataLabels: AADataLabels? = null
35 | var states: AAStates? = null
36 | var point: AAPoint? = null
37 | var pointInterval: Int? = null
38 | var pointIntervalUnit: String? = null
39 | var pointPlacement: Any? = null
40 | var pointStart: Number? = null
41 |
42 | fun borderColor(prop: String?): AASeries {
43 | borderColor = prop
44 | return this
45 | }
46 |
47 | fun borderWidth(prop: Number?): AASeries {
48 | borderWidth = prop
49 | return this
50 | }
51 |
52 | fun borderRadius(prop: Number?): AASeries {
53 | borderRadius = prop
54 | return this
55 | }
56 |
57 | fun borderRadiusTopLeft(prop: Any?): AASeries {
58 | borderRadiusTopLeft = prop
59 | return this
60 | }
61 |
62 | fun borderRadiusTopRight(prop: Any?): AASeries {
63 | borderRadiusTopRight = prop
64 | return this
65 | }
66 |
67 | fun borderRadiusBottomLeft(prop: Any?): AASeries {
68 | borderRadiusBottomLeft = prop
69 | return this
70 | }
71 |
72 | fun borderRadiusBottomRight(prop: Any?): AASeries {
73 | borderRadiusBottomRight = prop
74 | return this
75 | }
76 |
77 | fun marker(prop: AAMarker): AASeries {
78 | marker = prop
79 | return this
80 | }
81 |
82 | fun stacking(prop: AAChartStackingType?): AASeries {
83 | stacking = prop?.value
84 | return this
85 | }
86 |
87 | fun animation(prop: AAAnimation): AASeries {
88 | animation = prop
89 | return this
90 | }
91 |
92 | fun keys(prop: Array): AASeries {
93 | keys = prop
94 | return this
95 | }
96 |
97 | fun colorByPoint(prop: Boolean?): AASeries {
98 | colorByPoint = prop
99 | return this
100 | }
101 |
102 | fun connectNulls(prop: Boolean?): AASeries {
103 | connectNulls = prop
104 | return this
105 | }
106 |
107 | fun events(prop: AASeriesEvents): AASeries {
108 | events = prop
109 | return this
110 | }
111 |
112 | fun shadow(prop: AAShadow): AASeries {
113 | shadow = prop
114 | return this
115 | }
116 |
117 | fun dataLabels(prop: AADataLabels): AASeries {
118 | dataLabels = prop
119 | return this
120 | }
121 |
122 | fun states(prop: AAStates): AASeries {
123 | states = prop
124 | return this
125 | }
126 |
127 | fun point(prop: AAPoint): AASeries {
128 | point = prop
129 | return this
130 | }
131 |
132 | fun pointInterval(prop: Int): AASeries {
133 | pointInterval = prop
134 | return this
135 | }
136 |
137 | fun pointIntervalUnit(prop: String): AASeries {
138 | pointIntervalUnit = prop
139 | return this
140 | }
141 |
142 | fun pointPlacement(prop: Any): AASeries {
143 | pointPlacement = prop
144 | return this
145 | }
146 |
147 | fun pointStart(prop: Number): AASeries {
148 | pointStart = prop
149 | return this
150 | }
151 | }
152 |
153 | class AASeriesEvents {
154 | var legendItemClick: String? = null
155 |
156 | fun legendItemClick(prop: String): AASeriesEvents {
157 | legendItemClick = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
158 | return this
159 | }
160 | }
161 |
162 | class AAPoint {
163 | var events: AAPointEvents? = null
164 |
165 | fun events(prop: AAPointEvents): AAPoint {
166 | events = prop
167 | return this
168 | }
169 | }
170 |
171 | class AAPointEvents {
172 | var click //点击事件
173 | : String? = null
174 | var mouseOut //鼠标划出
175 | : String? = null
176 | var mouseOver //鼠标划过
177 | : String? = null
178 | var remove //删除
179 | : String? = null
180 | var select //选中
181 | : String? = null
182 | var unselect //取消选中
183 | : String? = null
184 | var update //更新
185 | : String? = null
186 | var legendItemClick //图例点击事件
187 | : String? = null
188 |
189 |
190 | fun click(prop: String?): AAPointEvents {
191 | click = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
192 | return this
193 | }
194 |
195 | fun mouseOut(prop: String?): AAPointEvents {
196 | mouseOut = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
197 | return this
198 | }
199 |
200 | fun mouseOver(prop: String?): AAPointEvents {
201 | mouseOver = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
202 | return this
203 | }
204 |
205 | fun remove(prop: String?): AAPointEvents {
206 | remove = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
207 | return this
208 | }
209 |
210 | fun select(prop: String?): AAPointEvents {
211 | select = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
212 | return this
213 | }
214 |
215 | fun unselect(prop: String?): AAPointEvents {
216 | unselect = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
217 | return this
218 | }
219 |
220 | fun update(prop: String?): AAPointEvents {
221 | update = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
222 | return this
223 | }
224 |
225 | fun legendItemClick(prop: String?): AAPointEvents {
226 | legendItemClick = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
227 | return this
228 | }
229 |
230 | }
231 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAShadow.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAShadow
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:31
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | class AAShadow {
12 | private var color: String? = null
13 | private var offsetX: Number? = null
14 | private var offsetY: Number? = null
15 | private var opacity: Float? = null
16 | private var width: Number? = null
17 |
18 | fun color(prop: String): AAShadow {
19 | color = prop
20 | return this
21 | }
22 |
23 | fun offsetX(prop: Number?): AAShadow {
24 | offsetX = prop
25 | return this
26 | }
27 |
28 | fun offsetY(prop: Number?): AAShadow {
29 | offsetY = prop
30 | return this
31 | }
32 |
33 | fun opacity(prop: Float?): AAShadow {
34 | opacity = prop
35 | return this
36 | }
37 |
38 | fun width(prop: Number?): AAShadow {
39 | width = prop
40 | return this
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAStates.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2020,
3 | * FileName: AAStates
4 | * Author: AnAn
5 | * Date: 2020-01-29 23:53
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | class AAStates {
12 | var hover: AAHover? = null
13 | var select: AASelect? = null
14 | var inactive: AAInactive? = null
15 |
16 | fun hover(prop: AAHover?): AAStates {
17 | hover = prop
18 | return this
19 | }
20 |
21 | fun select(prop: AASelect?): AAStates {
22 | select = prop
23 | return this
24 | }
25 |
26 | fun inactive(prop: AAInactive?): AAStates {
27 | inactive = prop
28 | return this
29 | }
30 | }
31 |
32 |
33 | class AAHover {
34 | var enabled: Boolean? = null
35 | var borderColor: String? = null
36 | var brightness: Float? = null
37 | var color: String? = null
38 | var halo: AAHalo? = null
39 | var lineWidth: Number? = null
40 | var lineWidthPlus: Number? = null
41 |
42 | fun enabled(prop: Boolean?): AAHover {
43 | enabled = prop
44 | return this
45 | }
46 |
47 | fun borderColor(prop: String?): AAHover {
48 | borderColor = prop
49 | return this
50 | }
51 |
52 | fun brightness(prop: Float?): AAHover {
53 | brightness = prop
54 | return this
55 | }
56 |
57 | fun color(prop: String?): AAHover {
58 | color = prop
59 | return this
60 | }
61 |
62 | fun halo(prop: AAHalo?): AAHover {
63 | halo = prop
64 | return this
65 | }
66 |
67 | fun lineWidth(prop: Number?): AAHover {
68 | lineWidth = prop
69 | return this
70 | }
71 |
72 | fun lineWidthPlus(prop: Number?): AAHover {
73 | lineWidthPlus = prop
74 | return this
75 | }
76 | }
77 |
78 | class AASelect {
79 | var borderColor: String? = null
80 | var color: String? = null
81 | var halo: AAHalo? = null
82 |
83 | fun borderColor(prop: String?): AASelect {
84 | borderColor = prop
85 | return this
86 | }
87 |
88 | fun color(prop: String?): AASelect {
89 | color = prop
90 | return this
91 | }
92 |
93 | fun halo(prop: AAHalo?): AASelect {
94 | halo = prop
95 | return this
96 | }
97 | }
98 |
99 | class AAHalo {
100 | var attributes: Map? = null
101 | var opacity: Float? = null
102 | var size: Number? = null
103 |
104 | fun attributes(prop: AASVGAttributes?): AAHalo {
105 | attributes = prop?.toDic()
106 | return this
107 | }
108 |
109 | fun opacity(prop: Float?): AAHalo {
110 | opacity = prop
111 | return this
112 | }
113 |
114 | fun size(prop: Number?): AAHalo {
115 | size = prop
116 | return this
117 | }
118 | }
119 |
120 | class AAInactive {
121 | var enabled: Boolean? = null
122 | var opacity: Number? = null
123 | fun enabled(prop: Boolean?): AAInactive {
124 | enabled = prop
125 | return this
126 | }
127 |
128 | fun opacity(prop: Number?): AAInactive {
129 | opacity = prop
130 | return this
131 | }
132 | }
133 |
134 | class AASVGAttributes {
135 | var fill: String? = null
136 | var stroke: String? = null
137 | var strokeWidth: Number? = null
138 |
139 | fun fill(prop: String?): AASVGAttributes {
140 | fill = prop
141 | return this
142 | }
143 |
144 | fun stroke(prop: String?): AASVGAttributes {
145 | stroke = prop
146 | return this
147 | }
148 |
149 | fun strokeWidth(prop: Number?): AASVGAttributes {
150 | strokeWidth = prop
151 | return this
152 | }
153 |
154 | // convert to dictionary in kotlin with let
155 | fun toDic(): Map {
156 | val dic: MutableMap = HashMap()
157 | strokeWidth?.let { dic["stroke-width"] = it }
158 | fill?.let { dic["fill"] = it }
159 | stroke?.let { dic["stroke"] = it }
160 | return dic
161 | }
162 |
163 | }
164 |
165 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAStyle.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAStyle
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:17
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartFontWeightType
12 |
13 |
14 | class AAStyle {
15 | var background: String? = null
16 | var backgroundColor: String? = null
17 | var border: String? = null
18 | var borderRadius: String? = null
19 | var color: String? = null
20 | var cursor: String? = null
21 | var fontFamily: String? = null
22 | var fontSize: String? = null
23 | var fontWeight: String? = null
24 | var height: Number? = null
25 | var lineWidth: Number? = null
26 | var opacity: Number? = null
27 | var padding: String? = null
28 | var pointerEvents: String? = null
29 | var position: String? = null
30 | var textAlign: String? = null
31 | var textDecoration: String? = null
32 | var textOutline: String? = null
33 | var textOverflow: String? = null
34 | var top: String? = null
35 | var transition: String? = null
36 | var whiteSpace: String? = null
37 | var width: Number? = null
38 |
39 |
40 | fun background(prop: String?): AAStyle {
41 | background = prop
42 | return this
43 | }
44 |
45 | fun backgroundColor(prop: String?): AAStyle {
46 | backgroundColor = prop
47 | return this
48 | }
49 |
50 | fun border(prop: String?): AAStyle {
51 | border = prop
52 | return this
53 | }
54 |
55 | fun borderRadius(prop: Number?): AAStyle {
56 | prop?.let {
57 | borderRadius = "${prop}px"
58 | }
59 | return this
60 | }
61 |
62 | fun color(prop: String?): AAStyle {
63 | color = prop
64 | return this
65 | }
66 |
67 | fun cursor(prop: String?): AAStyle {
68 | cursor = prop
69 | return this
70 | }
71 |
72 | fun fontFamily(prop: String?): AAStyle {
73 | fontFamily = prop
74 | return this
75 | }
76 |
77 | fun fontSize(prop: Number?): AAStyle {
78 | prop?.let {
79 | fontSize = "${prop}px"
80 | }
81 | return this
82 | }
83 |
84 | fun fontWeight(prop: AAChartFontWeightType?): AAStyle {
85 | fontWeight = prop?.value
86 | return this
87 | }
88 |
89 | fun height(prop: Number?): AAStyle {
90 | height = prop
91 | return this
92 | }
93 |
94 | fun lineWidth(prop: Number?): AAStyle {
95 | lineWidth = prop
96 | return this
97 | }
98 |
99 | fun opacity(prop: Number?): AAStyle {
100 | opacity = prop
101 | return this
102 | }
103 |
104 | fun padding(prop: Number?): AAStyle {
105 | prop?.let {
106 | padding = "${prop}px"
107 | }
108 | return this
109 | }
110 |
111 | fun pointerEvents(prop: String?): AAStyle {
112 | pointerEvents = prop
113 | return this
114 | }
115 |
116 | fun position(prop: String?): AAStyle {
117 | position = prop
118 | return this
119 | }
120 |
121 | fun textAlign(prop: String?): AAStyle {
122 | textAlign = prop
123 | return this
124 | }
125 |
126 | fun textDecoration(prop: String?): AAStyle {
127 | textDecoration = prop
128 | return this
129 | }
130 |
131 | fun textOutline(prop: String?): AAStyle {
132 | textOutline = prop
133 | return this
134 | }
135 |
136 | fun textOverflow(prop: String?): AAStyle {
137 | textOverflow = prop
138 | return this
139 | }
140 |
141 | fun top(prop: String?): AAStyle {
142 | top = prop
143 | return this
144 | }
145 |
146 | fun transition(prop: String?): AAStyle {
147 | transition = prop
148 | return this
149 | }
150 |
151 | fun whiteSpace(prop: String?): AAStyle {
152 | whiteSpace = prop
153 | return this
154 | }
155 |
156 | fun width(prop: Number?): AAStyle {
157 | width = prop
158 | return this
159 | }
160 |
161 | companion object {
162 | fun style(
163 | color: String?
164 | ): AAStyle {
165 | return style(color, null)
166 | }
167 |
168 | fun style(
169 | color: String?,
170 | fontSize: Number?
171 | ): AAStyle {
172 | return style(color, fontSize, null)
173 | }
174 |
175 | fun style(
176 | color: String?,
177 | fontSize: Number?,
178 | fontWeight: AAChartFontWeightType?
179 | ): AAStyle {
180 | return style(color, fontSize, fontWeight, null)
181 | }
182 |
183 | fun style(
184 | color: String?,
185 | fontSize: Number?,
186 | fontWeight: AAChartFontWeightType?,
187 | textOutline: String?
188 | ): AAStyle {
189 | return AAStyle()
190 | .color(color)
191 | .fontSize(fontSize)
192 | .fontWeight(fontWeight)
193 | .textOutline(textOutline)
194 | }
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AASubtitle.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AASubtitle
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:29
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
12 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
13 |
14 |
15 | class AASubtitle {
16 | private var text: String? = null
17 | private var style: AAStyle? = null
18 | private var align: String? = null
19 | private var verticalAlign: String? = null
20 | private var x: Number? = null
21 | private var y: Number? = null
22 | private var userHTML: Boolean? = null
23 |
24 | fun text(prop: String?): AASubtitle {
25 | text = prop
26 | return this
27 | }
28 |
29 | fun style(prop: AAStyle?): AASubtitle {
30 | style = prop
31 | return this
32 | }
33 |
34 | fun align(prop: AAChartAlignType?): AASubtitle {
35 | align = prop?.value
36 | return this
37 | }
38 |
39 | fun verticalAlign(prop: AAChartVerticalAlignType): AASubtitle {
40 | verticalAlign = prop.toString()
41 | return this
42 | }
43 |
44 | fun x(prop: Number?): AASubtitle {
45 | x = prop
46 | return this
47 | }
48 |
49 | fun y(prop: Number?): AASubtitle {
50 | y = prop
51 | return this
52 | }
53 |
54 | fun userHTML(prop: Boolean?): AASubtitle {
55 | userHTML = prop
56 | return this
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AATitle.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AATitle
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:26
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
12 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
13 |
14 | class AATitle {
15 | private var text: String? = null
16 | private var style: AAStyle? = null
17 | private var align: String? = null
18 | private var verticalAlign: String? = null
19 | private var x: Number? = null
20 | private var y: Number? = null
21 | private var userHTML: Boolean? = null
22 |
23 | fun text(prop: String?): AATitle {
24 | text = prop
25 | return this
26 | }
27 |
28 | fun style(prop: AAStyle?): AATitle {
29 | style = prop
30 | return this
31 | }
32 |
33 | fun align(prop: AAChartAlignType): AATitle {
34 | align = prop.toString()
35 | return this
36 | }
37 |
38 | fun verticalAlign(prop: AAChartVerticalAlignType): AATitle {
39 | verticalAlign = prop.toString()
40 | return this
41 | }
42 |
43 | fun x(prop: Number?): AATitle {
44 | x = prop
45 | return this
46 | }
47 |
48 | fun y(prop: Number?): AATitle {
49 | y = prop
50 | return this
51 | }
52 |
53 | fun userHTML(prop: Boolean?): AATitle {
54 | userHTML = prop
55 | return this
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AATooltip.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AATooltip
4 | * Author: ios-fn
5 | * Date: 2019-06-16 19:04
6 | * Description:
7 | * History:
8 | */
9 | /**
10 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
11 | * ◉◉◉................................................... ◉◉◉
12 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
13 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
14 | * ◉◉◉................................................... ◉◉◉
15 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
16 | */
17 |
18 | /**
19 |
20 | * -------------------------------------------------------------------------------
21 | *
22 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
23 | *
24 | * Please contact me on GitHub,if there are any problems encountered in use.
25 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
26 | * -------------------------------------------------------------------------------
27 | * And if you want to contribute for this project, please contact me as well
28 | * GitHub : https://github.com/AAChartModel
29 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
30 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
31 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
32 | *
33 | * -------------------------------------------------------------------------------
34 |
35 | */
36 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
37 |
38 | import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
39 |
40 |
41 | class AATooltip {
42 | var animation: Any? = null
43 | var backgroundColor: Any? = null
44 | var borderColor: String? = null
45 | var borderRadius: Number? = null
46 | var borderWidth: Number? = null
47 | var style: AAStyle? = null
48 | var shape: String? = null
49 | var enabled: Boolean? = null
50 | var useHTML: Boolean? = null
51 | var formatter: String? = null
52 | var headerFormat: String? = null
53 | var pointFormat: String? = null
54 | var footerFormat: String? = null
55 | var valueDecimals: Int? = null
56 | var shared: Boolean? = null
57 | var valueSuffix: String? = null
58 | var followTouchMove: Boolean? = null //https://api.highcharts.com.cn/highcharts#chart.panning
59 | var shadow: Boolean? = null
60 | var padding: Number? = null
61 | var pointFormatter: String? = null
62 | var positioner: String? = null
63 | var dateTimeLabelFormats: AADateTimeLabelFormats? = null
64 |
65 | fun animation(prop: AAAnimation): AATooltip {
66 | animation = prop
67 | return this
68 | }
69 |
70 | fun animation(prop: Boolean): AATooltip {
71 | animation = prop
72 | return this
73 | }
74 |
75 | fun backgroundColor(prop: Any): AATooltip {
76 | backgroundColor = prop
77 | return this
78 | }
79 |
80 | fun borderColor(prop: String): AATooltip {
81 | borderColor = prop
82 | return this
83 | }
84 |
85 | fun borderRadius(prop: Number?): AATooltip {
86 | borderRadius = prop
87 | return this
88 | }
89 |
90 | fun borderWidth(prop: Number?): AATooltip {
91 | borderWidth = prop
92 | return this
93 | }
94 |
95 | fun style(prop: AAStyle): AATooltip {
96 | style = prop
97 | return this
98 | }
99 |
100 | fun shape(prop: String): AATooltip {
101 | shape = prop
102 | return this
103 | }
104 |
105 | fun enabled(prop: Boolean?): AATooltip {
106 | enabled = prop
107 | return this
108 | }
109 |
110 | fun useHTML(prop: Boolean?): AATooltip {
111 | useHTML = prop
112 | return this
113 | }
114 |
115 | fun formatter(prop: String): AATooltip {
116 | formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
117 | return this
118 | }
119 |
120 | fun headerFormat(prop: String): AATooltip {
121 | headerFormat = prop
122 | return this
123 | }
124 |
125 | fun pointFormat(prop: String): AATooltip {
126 | pointFormat = prop
127 | return this
128 | }
129 |
130 | fun footerFormat(prop: String): AATooltip {
131 | footerFormat = prop
132 | return this
133 | }
134 |
135 | fun valueDecimals(prop: Int?): AATooltip {
136 | valueDecimals = prop
137 | return this
138 | }
139 |
140 | fun shared(prop: Boolean?): AATooltip {
141 | shared = prop
142 | return this
143 | }
144 |
145 | fun valueSuffix(prop: String?): AATooltip {
146 | valueSuffix = prop
147 | return this
148 | }
149 |
150 | fun followTouchMove(prop: Boolean): AATooltip {
151 | followTouchMove = prop
152 | return this
153 | }
154 |
155 | fun shadow(prop: Boolean): AATooltip {
156 | shadow = prop
157 | return this
158 | }
159 |
160 | fun padding(prop: Number): AATooltip {
161 | padding = prop
162 | return this
163 | }
164 |
165 | fun pointFormatter(prop: String): AATooltip {
166 | pointFormatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
167 | return this
168 | }
169 |
170 | fun positioner(prop: String): AATooltip {
171 | positioner = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
172 | return this
173 | }
174 |
175 | fun dateTimeLabelFormats(prop: AADateTimeLabelFormats): AATooltip {
176 | dateTimeLabelFormats = prop
177 | return this
178 | }
179 |
180 | init {
181 | shared = true
182 | enabled = true
183 | shadow = true
184 | }
185 |
186 | }
187 |
188 |
189 |
190 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAXAxis.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAXAxis
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:20
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 |
12 | open class AAXAxis: AAAxis() {
13 | fun allowDecimals(prop: Boolean?): AAXAxis {
14 | allowDecimals = prop
15 | return this
16 | }
17 |
18 | fun alternateGridColor(prop: Any): AAXAxis {
19 | alternateGridColor = prop
20 | return this
21 | }
22 |
23 | fun crosshair(prop: AACrosshair): AAXAxis {
24 | crosshair = prop
25 | return this
26 | }
27 |
28 | fun title(prop: AATitle): AAXAxis {
29 | title = prop
30 | return this
31 | }
32 |
33 | fun type(prop: AAChartAxisType): AAXAxis {
34 | type = prop.value
35 | return this
36 | }
37 |
38 | fun dateTimeLabelFormats(prop: AADateTimeLabelFormats): AAXAxis {
39 | dateTimeLabelFormats = prop
40 | return this
41 | }
42 |
43 | fun plotBands(prop: Array): AAXAxis {
44 | plotBands = prop
45 | return this
46 | }
47 |
48 | fun plotLines(prop: Array): AAXAxis {
49 | plotLines = prop
50 | return this
51 | }
52 |
53 | fun categories(prop: Array?): AAXAxis {
54 | categories = prop
55 | return this
56 | }
57 |
58 | fun linkedTo(prop: Int?): AAXAxis {
59 | linkedTo = prop
60 | return this
61 | }
62 |
63 | fun reversed(prop: Boolean?): AAXAxis {
64 | reversed = prop
65 | return this
66 | }
67 |
68 | fun reversedStacks(prop: Boolean?): AAXAxis {
69 | reversedStacks = prop
70 | return this
71 | }
72 |
73 | fun gridLineWidth(prop: Number?): AAXAxis {
74 | gridLineWidth = prop
75 | return this
76 | }
77 |
78 | fun gridLineColor(prop: String): AAXAxis {
79 | gridLineColor = prop
80 | return this
81 | }
82 |
83 | fun gridLineDashStyle(prop: String): AAXAxis {
84 | gridLineDashStyle = prop
85 | return this
86 | }
87 |
88 | fun gridLineInterpolation(prop: String): AAXAxis {
89 | gridLineInterpolation = prop
90 | return this
91 | }
92 |
93 | fun labels(prop: AALabels): AAXAxis {
94 | labels = prop
95 | return this
96 | }
97 |
98 | fun lineWidth(prop: Number?): AAXAxis {
99 | lineWidth = prop
100 | return this
101 | }
102 |
103 | fun lineColor(prop: String): AAXAxis {
104 | lineColor = prop
105 | return this
106 | }
107 |
108 | fun offset(prop: Number?): AAXAxis {
109 | offset = prop
110 | return this
111 | }
112 |
113 | fun max(prop: Number?): AAXAxis {
114 | max = prop
115 | return this
116 | }
117 |
118 | fun min(prop: Number?): AAXAxis {
119 | min = prop
120 | return this
121 | }
122 |
123 | fun minRange(prop: Int?): AAXAxis {
124 | minRange = prop
125 | return this
126 | }
127 |
128 | fun minTickInterval(prop: Int?): AAXAxis {
129 | minTickInterval = prop
130 | return this
131 | }
132 |
133 | fun minorTicks(prop: Boolean?): AAXAxis {
134 | minorTicks = prop
135 | return this
136 | }
137 |
138 | fun minorGridLineColor(prop: String?): AAXAxis {
139 | minorGridLineColor = prop
140 | return this
141 | }
142 |
143 | fun minorGridLineDashStyle(prop: String?): AAXAxis {
144 | minorGridLineDashStyle = prop
145 | return this
146 | }
147 |
148 | fun minorGridLineWidth(prop: Number?): AAXAxis {
149 | minorGridLineWidth = prop
150 | return this
151 | }
152 |
153 | fun minorTickColor(prop: String?): AAXAxis {
154 | minorTickColor = prop
155 | return this
156 | }
157 |
158 | fun minorTickInterval(prop: Any?): AAXAxis {
159 | minorTickInterval = prop
160 | return this
161 | }
162 |
163 | fun minorTickLength(prop: Number?): AAXAxis {
164 | minorTickLength = prop
165 | return this
166 | }
167 |
168 | fun minorTickPosition(prop: String?): AAXAxis {
169 | minorTickPosition = prop
170 | return this
171 | }
172 |
173 | fun minorTickWidth(prop: Number?): AAXAxis {
174 | minorTickWidth = prop
175 | return this
176 | }
177 |
178 | fun visible(prop: Boolean?): AAXAxis {
179 | visible = prop
180 | return this
181 | }
182 |
183 | fun startOnTick(prop: Boolean?): AAXAxis {
184 | startOnTick = prop
185 | return this
186 | }
187 |
188 | fun endOnTick(prop: Boolean?): AAXAxis {
189 | endOnTick = prop
190 | return this
191 | }
192 |
193 | fun opposite(prop: Boolean?): AAXAxis {
194 | opposite = prop
195 | return this
196 | }
197 |
198 | fun tickColor(prop: String?): AAXAxis {
199 | tickColor = prop
200 | return this
201 | }
202 |
203 | fun tickPositions(prop: Array): AAXAxis {
204 | tickPositions = prop
205 | return this
206 | }
207 |
208 | fun tickInterval(prop: Number?): AAXAxis {
209 | tickInterval = prop
210 | return this
211 | }
212 |
213 | fun tickmarkPlacement(prop: String): AAXAxis {
214 | tickmarkPlacement = prop
215 | return this
216 | }
217 |
218 | fun tickWidth(prop: Number?): AAXAxis {
219 | tickWidth = prop
220 | return this
221 | }
222 |
223 | fun tickLength(prop: Number?): AAXAxis {
224 | tickLength = prop
225 | return this
226 | }
227 |
228 | fun tickPosition(prop: String): AAXAxis {
229 | tickPosition = prop
230 | return this
231 | }
232 | }
233 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAYAxis.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C), 2015-2019
3 | * FileName: AAYAxis
4 | * Author: AnAn
5 | * Date: 2019-08-30 11:25
6 | * Description:
7 | * History:
8 | */
9 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
10 |
11 | open class AAYAxis: AAAxis() {
12 | var stackLabels: Any? = null
13 | fun stackLabels(prop: Any?): AAYAxis {
14 | stackLabels = prop
15 | return this
16 | }
17 | //////////////////////////////////////////////
18 |
19 | fun allowDecimals(prop: Boolean?): AAYAxis {
20 | allowDecimals = prop
21 | return this
22 | }
23 |
24 | fun alternateGridColor(prop: Any): AAYAxis {
25 | alternateGridColor = prop
26 | return this
27 | }
28 |
29 | fun crosshair(prop: AACrosshair): AAYAxis {
30 | crosshair = prop
31 | return this
32 | }
33 |
34 | fun title(prop: AATitle): AAYAxis {
35 | title = prop
36 | return this
37 | }
38 |
39 | fun type(prop: AAChartAxisType): AAYAxis {
40 | type = prop.value
41 | return this
42 | }
43 |
44 | fun dateTimeLabelFormats(prop: AADateTimeLabelFormats): AAYAxis {
45 | dateTimeLabelFormats = prop
46 | return this
47 | }
48 |
49 | fun plotBands(prop: Array): AAYAxis {
50 | plotBands = prop
51 | return this
52 | }
53 |
54 | fun plotLines(prop: Array): AAYAxis {
55 | plotLines = prop
56 | return this
57 | }
58 |
59 | fun categories(prop: Array?): AAYAxis {
60 | categories = prop
61 | return this
62 | }
63 |
64 | fun linkedTo(prop: Int?): AAYAxis {
65 | linkedTo = prop
66 | return this
67 | }
68 |
69 | fun reversed(prop: Boolean?): AAYAxis {
70 | reversed = prop
71 | return this
72 | }
73 |
74 | fun reversedStacks(prop: Boolean?): AAYAxis {
75 | reversedStacks = prop
76 | return this
77 | }
78 |
79 | fun gridLineWidth(prop: Number?): AAYAxis {
80 | gridLineWidth = prop
81 | return this
82 | }
83 |
84 | fun gridLineColor(prop: String): AAYAxis {
85 | gridLineColor = prop
86 | return this
87 | }
88 |
89 | fun gridLineDashStyle(prop: String): AAYAxis {
90 | gridLineDashStyle = prop
91 | return this
92 | }
93 |
94 | fun gridLineInterpolation(prop: String): AAYAxis {
95 | gridLineInterpolation = prop
96 | return this
97 | }
98 |
99 | fun labels(prop: AALabels): AAYAxis {
100 | labels = prop
101 | return this
102 | }
103 |
104 | fun lineWidth(prop: Number?): AAYAxis {
105 | lineWidth = prop
106 | return this
107 | }
108 |
109 | fun lineColor(prop: String): AAYAxis {
110 | lineColor = prop
111 | return this
112 | }
113 |
114 | fun offset(prop: Number?): AAYAxis {
115 | offset = prop
116 | return this
117 | }
118 |
119 | fun max(prop: Number?): AAYAxis {
120 | max = prop
121 | return this
122 | }
123 |
124 | fun min(prop: Number?): AAYAxis {
125 | min = prop
126 | return this
127 | }
128 |
129 | fun minRange(prop: Int?): AAYAxis {
130 | minRange = prop
131 | return this
132 | }
133 |
134 | fun minTickInterval(prop: Int?): AAYAxis {
135 | minTickInterval = prop
136 | return this
137 | }
138 |
139 | fun minorTicks(prop: Boolean?): AAYAxis {
140 | minorTicks = prop
141 | return this
142 | }
143 |
144 | fun minorGridLineColor(prop: String?): AAYAxis {
145 | minorGridLineColor = prop
146 | return this
147 | }
148 |
149 | fun minorGridLineDashStyle(prop: String?): AAYAxis {
150 | minorGridLineDashStyle = prop
151 | return this
152 | }
153 |
154 | fun minorGridLineWidth(prop: Number?): AAYAxis {
155 | minorGridLineWidth = prop
156 | return this
157 | }
158 |
159 | fun minorTickColor(prop: String?): AAYAxis {
160 | minorTickColor = prop
161 | return this
162 | }
163 |
164 | fun minorTickInterval(prop: Any?): AAYAxis {
165 | minorTickInterval = prop
166 | return this
167 | }
168 |
169 | fun minorTickLength(prop: Number?): AAYAxis {
170 | minorTickLength = prop
171 | return this
172 | }
173 |
174 | fun minorTickPosition(prop: String?): AAYAxis {
175 | minorTickPosition = prop
176 | return this
177 | }
178 |
179 | fun minorTickWidth(prop: Number?): AAYAxis {
180 | minorTickWidth = prop
181 | return this
182 | }
183 |
184 | fun visible(prop: Boolean?): AAYAxis {
185 | visible = prop
186 | return this
187 | }
188 |
189 | fun startOnTick(prop: Boolean?): AAYAxis {
190 | startOnTick = prop
191 | return this
192 | }
193 |
194 | fun endOnTick(prop: Boolean?): AAYAxis {
195 | endOnTick = prop
196 | return this
197 | }
198 |
199 | fun opposite(prop: Boolean?): AAYAxis {
200 | opposite = prop
201 | return this
202 | }
203 |
204 | fun tickColor(prop: String?): AAYAxis {
205 | tickColor = prop
206 | return this
207 | }
208 |
209 | fun tickPositions(prop: Array): AAYAxis {
210 | tickPositions = prop
211 | return this
212 | }
213 |
214 | fun tickInterval(prop: Number?): AAYAxis {
215 | tickInterval = prop
216 | return this
217 | }
218 |
219 | fun tickmarkPlacement(prop: String): AAYAxis {
220 | tickmarkPlacement = prop
221 | return this
222 | }
223 |
224 | fun tickWidth(prop: Number?): AAYAxis {
225 | tickWidth = prop
226 | return this
227 | }
228 |
229 | fun tickLength(prop: Number?): AAYAxis {
230 | tickLength = prop
231 | return this
232 | }
233 |
234 | fun tickPosition(prop: String): AAYAxis {
235 | tickPosition = prop
236 | return this
237 | }
238 |
239 | }
240 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AAZonesElement.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aaoptionsmodel
2 |
3 | class AAZonesElement {
4 | var value: Number? = null
5 | var color: Any? = null
6 | var fillColor: Any? = null
7 | var dashStyle: String? = null
8 |
9 | fun value(prop: Number?): AAZonesElement {
10 | value = prop
11 | return this
12 | }
13 |
14 | fun color(prop: Any?): AAZonesElement {
15 | color = prop
16 | return this
17 | }
18 |
19 | fun fillColor(prop: Any?): AAZonesElement {
20 | fillColor = prop
21 | return this
22 | }
23 |
24 | fun dashStyle(prop: String?): AAZonesElement {
25 | dashStyle = prop
26 | return this
27 | }
28 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aatools/AAColor.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.aatools
29 |
30 | fun AARgba(red: Int,
31 | green: Int,
32 | blue: Int,
33 | alpha: Float = 1f): String {
34 | return "rgba($red,$green,$blue,$alpha)"
35 | }
36 |
37 | fun AARgb(red: Int,
38 | green: Int,
39 | blue: Int,
40 | alpha: Float = 1f): String {
41 | return AARgba(red, green, blue, 1f)
42 | }
43 |
44 | object AAColor {
45 | val Black = blackColor()
46 | val DarkGray = darkGrayColor()
47 | val LightGray = lightGrayColor()
48 | val White = whiteColor()
49 | val Gray = grayColor()
50 | val Red = redColor()
51 | val Green = greenColor()
52 | val Blue = blueColor()
53 | val Cyan = cyanColor()
54 | val Yellow = yellowColor()
55 | val Magenta = magentaColor()
56 | val Orange = orangeColor()
57 | val Purple = purpleColor()
58 | val Brown = brownColor()
59 | val Clear = clearColor()
60 |
61 | fun rgbaColor(
62 | red: Int,
63 | green: Int,
64 | blue: Int,
65 | alpha: Float = 1f
66 | ): String {
67 | return "rgba($red,$green,$blue,$alpha)"
68 | }
69 |
70 | private fun blackColor(): String {
71 | return "black"
72 | }
73 |
74 | private fun darkGrayColor(): String {
75 | return "darkGray"
76 | }
77 |
78 | private fun lightGrayColor(): String {
79 | return "lightGray"
80 | }
81 |
82 | private fun whiteColor(): String {
83 | return "white"
84 | }
85 |
86 | private fun grayColor(): String {
87 | return "gray"
88 | }
89 |
90 | private fun redColor(): String {
91 | return "red"
92 | }
93 |
94 | private fun greenColor(): String {
95 | return "green"
96 | }
97 |
98 | private fun blueColor(): String {
99 | return "blue"
100 | }
101 |
102 | private fun cyanColor(): String {
103 | return "cyan"
104 | }
105 |
106 | private fun yellowColor(): String {
107 | return "yellow"
108 | }
109 |
110 | private fun magentaColor(): String {
111 | return "magenta"
112 | }
113 |
114 | private fun orangeColor(): String {
115 | return "orange"
116 | }
117 |
118 | private fun purpleColor(): String {
119 | return "purple"
120 | }
121 |
122 | private fun brownColor(): String {
123 | return "brown"
124 | }
125 |
126 | private fun clearColor(): String {
127 | return "clear"
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aatools/AADateUTC.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.aatools
2 |
3 | import java.text.ParseException
4 | import java.text.SimpleDateFormat
5 | import java.util.*
6 |
7 | object AADate {
8 | // get UTC number from date
9 | fun AADateUTC(year: Int, month: Int, day: Int): Long {
10 | val sdf = SimpleDateFormat("yyyy-MM-dd")
11 | sdf.timeZone = TimeZone.getTimeZone("UTC")
12 | var date: Date? = null
13 | try {
14 | date = sdf.parse("$year-$month-$day")
15 | } catch (e: ParseException) {
16 | e.printStackTrace()
17 | }
18 | return date!!.time
19 | }
20 | }
--------------------------------------------------------------------------------
/charts/src/main/java/com/github/aachartmodel/aainfographics/aatools/AAJSStringPurer.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.aatools
29 |
30 |
31 | object AAJSStringPurer {
32 |
33 | fun pureJavaScriptFunctionString(JSStr: String): String {
34 | var pureJSStr = JSStr
35 | pureJSStr = pureJSStr.replace("'", "\"")
36 | pureJSStr = pureJSStr.replace("\u0000", "")
37 | pureJSStr = pureJSStr.replace("\n", "")
38 | pureJSStr = pureJSStr.replace("\\", "\\\\")
39 | pureJSStr = pureJSStr.replace("\"", "\\\"")
40 | pureJSStr = pureJSStr.replace("\'", "\\\'");
41 | pureJSStr = pureJSStr.replace("\n", "\\n")
42 | pureJSStr = pureJSStr.replace("\r", "\\r")
43 | // pureJSStr = pureJSStr.replace("\f", "\\f")
44 | pureJSStr = pureJSStr.replace("\u2028", "\\u2028")
45 | pureJSStr = pureJSStr.replace("\u2029", "\\u2029")
46 |
47 | return pureJSStr
48 | }
49 |
50 | //https://stackoverflow.com/questions/34334232/why-does-function-not-work-but-function-does-chrome-devtools-node
51 | fun pureAnonymousJSFunctionString(JSStr: String?): String? {
52 | var pureJSStr = "($JSStr)"
53 | pureJSStr = pureJavaScriptFunctionString(pureJSStr)
54 | return pureJSStr
55 | }
56 |
57 | }
58 |
59 | fun Array.aa_toJSArray(): String {
60 | var originalJsArrStr = ""
61 | for (i in this.indices) {
62 | val element = this[i]
63 | originalJsArrStr = "$originalJsArrStr'$element',"
64 | }
65 | return "[$originalJsArrStr]"
66 | }
--------------------------------------------------------------------------------
/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=-Xmx1536m
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
22 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/sample/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android'
3 |
4 | android {
5 |
6 | compileSdk 33
7 |
8 | defaultConfig {
9 | applicationId "com.github.aachartmodel.aainfographics.demo"
10 | minSdkVersion 19
11 | versionCode 1
12 | versionName "1.0.0"
13 | }
14 |
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 |
22 | android {
23 | lintOptions {
24 | abortOnError false
25 | }
26 |
27 | compileOptions {
28 | sourceCompatibility = JavaVersion.VERSION_1_8
29 | targetCompatibility = JavaVersion.VERSION_1_8
30 | }
31 | kotlinOptions {
32 | jvmTarget = "1.8"
33 | }
34 | }
35 | }
36 |
37 | dependencies {
38 | implementation project(':charts')
39 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.20"
40 | implementation "androidx.appcompat:appcompat:1.6.1"
41 | implementation "androidx.constraintlayout:constraintlayout:2.1.4"
42 | implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
43 | implementation "com.google.code.gson:gson:2.10.1"
44 | }
--------------------------------------------------------------------------------
/sample/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
22 |
23 | -keep class com.github.aachartmodel.aainfographics.** { *; }
--------------------------------------------------------------------------------
/sample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/DrawChartWithAAOptionsActivity.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
29 |
30 | import android.os.Bundle
31 | import androidx.appcompat.app.AppCompatActivity
32 |
33 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
34 | import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
35 | import com.github.aachartmodel.aainfographics.demo.R
36 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureAAPlotBandsForChart
37 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureAAPlotLinesForChart
38 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureDoubleYAxesAndColumnLineMixedChart
39 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureDoubleYAxesMarketDepthChart
40 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureDoubleYAxisChartOptions
41 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureTheMirrorColumnChart
42 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureTripleYAxesMixedChart
43 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureXAxisLabelsFontColorAndFontSizeWithHTMLString
44 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureXAxisLabelsFontColorWithHTMLString
45 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureXAxisPlotBand
46 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configure_DataLabels_XAXis_YAxis_Legend_Style
47 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customAATooltipWithJSFunction
48 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customAreaChartTooltipStyleLikeHTMLTable
49 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customChartLegendStyle
50 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customLineChartDataLabelsFormat
51 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customXAxisCrosshairStyle
52 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.doubleLayerHalfPieChart
53 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.gaugeChartWithPlotBand
54 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.simpleGaugeChart
55 |
56 | class DrawChartWithAAOptionsActivity : AppCompatActivity() {
57 |
58 | override fun onCreate(savedInstanceState: Bundle?) {
59 | super.onCreate(savedInstanceState)
60 | setContentView(R.layout.activity_draw_chart_with_aaoptions)
61 |
62 | val intent = intent
63 | val chartType = intent.getStringExtra("chartType")
64 |
65 | val aaOptions = configureTheChartOptions(chartType!!)
66 |
67 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
68 | aaChartView.aa_drawChartWithChartOptions(aaOptions)
69 |
70 | }
71 |
72 | private fun configureTheChartOptions(chartType: String): AAOptions {
73 | when (chartType) {
74 | "customLegendStyle" -> return customChartLegendStyle()
75 | "AAPlotBandsForChart" -> return configureAAPlotBandsForChart()
76 | "AAPlotLinesForChart" -> return configureAAPlotLinesForChart()
77 | "customAATooltipWithJSFunction" -> return customAATooltipWithJSFunction()
78 | "customXAxisCrosshairStyle" -> return customXAxisCrosshairStyle()
79 | "XAxisLabelsFontColorWithHTMLString" -> return configureXAxisLabelsFontColorWithHTMLString()
80 | "XAxisLabelsFontColorAndFontSizeWithHTMLString" -> return configureXAxisLabelsFontColorAndFontSizeWithHTMLString()
81 | "_DataLabels_XAXis_YAxis_Legend_Style" -> return configure_DataLabels_XAXis_YAxis_Legend_Style()
82 | "XAxisPlotBand" -> return configureXAxisPlotBand()
83 | "configureTheMirrorColumnChart" -> return configureTheMirrorColumnChart()
84 | "configureDoubleYAxisChartOptions" -> return configureDoubleYAxisChartOptions()
85 | "configureTripleYAxesMixedChart" -> return configureTripleYAxesMixedChart()
86 | "customLineChartDataLabelsFormat" -> return customLineChartDataLabelsFormat()
87 | "configureDoubleYAxesAndColumnLineMixedChart" -> return configureDoubleYAxesAndColumnLineMixedChart()
88 | "configureDoubleYAxesMarketDepthChart" -> return configureDoubleYAxesMarketDepthChart()
89 | "customAreaChartTooltipStyleLikeHTMLTable" -> return customAreaChartTooltipStyleLikeHTMLTable()
90 | "simpleGaugeChart" -> return simpleGaugeChart()
91 | "gaugeChartWithPlotBand" -> return gaugeChartWithPlotBand()
92 | "doubleLayerHalfPieChart" -> return doubleLayerHalfPieChart()
93 | }
94 | return configureAAPlotBandsForChart()
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/EvaluateJSStringFunctionActivity.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
29 |
30 | import android.os.Bundle
31 | import androidx.appcompat.app.AppCompatActivity
32 | import com.github.aachartmodel.aainfographics.demo.R
33 |
34 |
35 | class EvaluateJSStringFunctionActivity : AppCompatActivity() {
36 |
37 | override fun onCreate(savedInstanceState: Bundle?) {
38 | super.onCreate(savedInstanceState)
39 | setContentView(R.layout.activity_evaluate_jsstring_function)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/HideOrShowChartSeriesActivity.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
29 |
30 | import android.os.Bundle
31 | import androidx.appcompat.app.AppCompatActivity
32 | import com.github.aachartmodel.aainfographics.demo.R
33 |
34 |
35 | class HideOrShowChartSeriesActivity : AppCompatActivity() {
36 |
37 | override fun onCreate(savedInstanceState: Bundle?) {
38 | super.onCreate(savedInstanceState)
39 | setContentView(R.layout.activity_hide_or_show_chart_series)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/JSFormatterFunctionActivity.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
29 |
30 | import android.os.Bundle
31 | import androidx.appcompat.app.AppCompatActivity
32 |
33 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
34 | import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
35 | import com.github.aachartmodel.aainfographics.demo.R
36 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customAreaChartTooltipStyleWithColorfulHtmlLabels
37 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customAreaChartTooltipStyleWithDifferentUnitSuffix
38 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customAreaChartTooltipStyleWithSimpleFormatString
39 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customArearangeChartTooltip
40 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customBoxplotTooltipContent
41 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customDoubleXAxesChart
42 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customLineChartOriginalPointPositionByConfiguringXAxisFormatterAndTooltipFormatter
43 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customLineChartTooltipStyleWhenValueBeZeroDoNotShow
44 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customStackedAndGroupedColumnChartTooltip
45 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customTooltipWhichDataSourceComeFromOutSideRatherThanSeries
46 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customYAxisLabels
47 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customYAxisLabels2
48 |
49 | class JSFormatterFunctionActivity : AppCompatActivity() {
50 |
51 | override fun onCreate(savedInstanceState: Bundle?) {
52 | super.onCreate(savedInstanceState)
53 | setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
54 | val intent = intent
55 | val chartType = intent.getStringExtra("chartType")
56 |
57 | val aaOptions = configureTheChartOptions(chartType!!)
58 |
59 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
60 | aaChartView.aa_drawChartWithChartOptions(aaOptions)
61 |
62 | }
63 |
64 | private fun configureTheChartOptions(chartType: String): AAOptions {
65 | when (chartType) {
66 | "customAreaChartTooltipStyleWithSimpleFormatString" -> return customAreaChartTooltipStyleWithSimpleFormatString()//简单字符串拼接
67 | "customAreaChartTooltipStyleWithDifferentUnitSuffix" -> return customAreaChartTooltipStyleWithDifferentUnitSuffix()//自定义不同单位后缀
68 | "customAreaChartTooltipStyleWithColorfulHtmlLabels" -> return customAreaChartTooltipStyleWithColorfulHtmlLabels()//自定义多彩颜色文字
69 | "customLineChartTooltipStyleWhenValueBeZeroDoNotShow" -> return customLineChartTooltipStyleWhenValueBeZeroDoNotShow()//值为0时,在tooltip中不显示
70 | "customBoxplotTooltipContent" -> return customBoxplotTooltipContent()
71 | "customYAxisLabels" -> return customYAxisLabels()
72 | "customYAxisLabels2" -> return customYAxisLabels2()
73 | "customStackedAndGroupedColumnChartTooltip" -> return customStackedAndGroupedColumnChartTooltip()
74 | "customDoubleXAxesChart" -> return customDoubleXAxesChart()
75 | "customArearangeChartTooltip" -> return customArearangeChartTooltip()
76 | "customLineChartOriginalPointPositionByConfiguringXAxisFormatterAndTooltipFormatter" ->
77 | return customLineChartOriginalPointPositionByConfiguringXAxisFormatterAndTooltipFormatter()
78 | "customTooltipWhichDataSourceComeFromOutSideRatherThanSeries" ->
79 | return customTooltipWhichDataSourceComeFromOutSideRatherThanSeries()
80 |
81 | }
82 | return customAreaChartTooltipStyleWithSimpleFormatString()
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/JSFunctionForAAAxisActivity.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
6 | import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
7 | import com.github.aachartmodel.aainfographics.demo.R
8 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customYAxisLabels
9 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customYAxisLabels2
10 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customAreaChartXAxisLabelsTextUnitSuffix1
11 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customAreaChartXAxisLabelsTextUnitSuffix2
12 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.configureTheAxesLabelsFormattersOfDoubleYAxesChart
13 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.configureTheAxesLabelsFormattersOfDoubleYAxesChart2
14 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.configureTheAxesLabelsFormattersOfDoubleYAxesChart3
15 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters
16 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customSpiderChartStyle
17 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customizeEveryDataLabelSinglelyByDataLabelsFormatter
18 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customXAxisLabelsBeImages
19 |
20 |
21 | class JSFunctionForAAAxisActivity : AppCompatActivity() {
22 | override fun onCreate(savedInstanceState: Bundle?) {
23 | super.onCreate(savedInstanceState)
24 | setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
25 | val intent = intent
26 | val chartType = intent.getStringExtra("chartType")
27 | val aaOptions: AAOptions = chartConfigurationWithSelectedIndex(chartType)
28 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
29 | aaChartView.aa_drawChartWithChartOptions(aaOptions)
30 | }
31 |
32 | fun chartConfigurationWithSelectedIndex(chartType: String?): AAOptions {
33 | return when (chartType) {
34 | "customYAxisLabels" -> customYAxisLabels() //自定义Y轴文字
35 | "customYAxisLabels2" -> customYAxisLabels2() //自定义Y轴文字2
36 | "customAreaChartXAxisLabelsTextUnitSuffix1" -> customAreaChartXAxisLabelsTextUnitSuffix1() //自定义X轴文字单位后缀(通过 formatter 函数)
37 | "customAreaChartXAxisLabelsTextUnitSuffix2" -> customAreaChartXAxisLabelsTextUnitSuffix2() //自定义X轴文字单位后缀(不通过 formatter 函数)
38 | "configureTheAxesLabelsFormattersOfDoubleYAxesChart" -> configureTheAxesLabelsFormattersOfDoubleYAxesChart() //配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 1
39 | "configureTheAxesLabelsFormattersOfDoubleYAxesChart2" -> configureTheAxesLabelsFormattersOfDoubleYAxesChart2() //配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 2
40 | "configureTheAxesLabelsFormattersOfDoubleYAxesChart3" -> configureTheAxesLabelsFormattersOfDoubleYAxesChart3() //配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 3
41 | "customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters" -> customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters() //通过截取前四个字符来自定义 X 轴 labels
42 | "customSpiderChartStyle" -> customSpiderChartStyle() //自定义蜘蛛🕷🕸图样式
43 | "customizeEveryDataLabelSinglelyByDataLabelsFormatter" -> customizeEveryDataLabelSinglelyByDataLabelsFormatter() //通过 DataLabels 的 formatter 函数来实现单个数据标签🏷自定义
44 | "customXAxisLabelsBeImages" -> customXAxisLabelsBeImages() //自定义 X轴 labels 为一组图片
45 | else -> customYAxisLabels()
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/JSFunctionForAAChartEventsActivity.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
6 | import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
7 | import com.github.aachartmodel.aainfographics.demo.R
8 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart
9 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.advancedTimeLineChart
10 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.automaticallyHideTooltipAfterItIsShown
11 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureBlinkMarkerChart
12 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureECGStyleChart
13 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureScatterChartWithBlinkEffect
14 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect
15 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.customizeYAxisPlotLinesLabelBeSpecialStyle
16 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.dynamicHeightGridLineAreaChart
17 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.generalDrawingChart
18 |
19 | class JSFunctionForAAChartEventsActivity : AppCompatActivity() {
20 | override fun onCreate(savedInstanceState: Bundle?) {
21 | super.onCreate(savedInstanceState)
22 | setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
23 |
24 | val intent = intent
25 | val chartType = intent.getStringExtra("chartType")
26 |
27 | val aaOptions = configureTheChartOptions(chartType!!)
28 |
29 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
30 | aaChartView.aa_drawChartWithChartOptions(aaOptions) }
31 |
32 | fun configureTheChartOptions(chartType: String?): AAOptions {
33 | when (chartType) {
34 | "setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart" -> return setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart() //图表加载完成后,自动设置默认的十字准星和浮动提示框的位置
35 | "generalDrawingChart" -> return generalDrawingChart() //自由绘图
36 | "advancedTimeLineChart" -> return advancedTimeLineChart() //高级时间线图
37 | "configureBlinkMarkerChart" -> return configureBlinkMarkerChart() //配置闪烁的标记点
38 | "configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect" -> return configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect() //配置单个数据元素的特殊样式标记点即闪烁特效
39 | "configureScatterChartWithBlinkEffect" -> return configureScatterChartWithBlinkEffect() //配置散点图的闪烁特效
40 | "automaticallyHideTooltipAfterItIsShown" -> return automaticallyHideTooltipAfterItIsShown() //图表加载完成后,自动隐藏浮动提示框
41 | "dynamicHeightGridLineAreaChart" -> return dynamicHeightGridLineAreaChart() //动态高度网格线的区域填充图
42 | "customizeYAxisPlotLinesLabelBeSpecialStyle" -> return customizeYAxisPlotLinesLabelBeSpecialStyle() //自定义 Y 轴轴线上面的标签文字特殊样式
43 | "configureECGStyleChart" -> return configureECGStyleChart() //配置 ECG 样式的图表
44 | }
45 | return setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart()
46 | }
47 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/JSFunctionForAALegendActivity.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
6 | import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
7 | import com.github.aachartmodel.aainfographics.demo.R
8 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAALegendComposer.customLegendItemClickEvent
9 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAALegendComposer.disableLegendClickEventForNormalChart
10 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAALegendComposer.disableLegendClickEventForPieChart
11 |
12 | class JSFunctionForAALegendActivity : AppCompatActivity() {
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
16 | val intent = intent
17 | val chartType = intent.getStringExtra("chartType")
18 | val aaOptions: AAOptions = chartConfigurationWithSelectedIndex(chartType)
19 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
20 | aaChartView.aa_drawChartWithChartOptions(aaOptions)
21 | }
22 |
23 | fun chartConfigurationWithSelectedIndex(chartType: String?): AAOptions {
24 | return when (chartType) {
25 | "disableLegendClickEventForNormalChart" -> disableLegendClickEventForNormalChart() //禁用普通图表的图例点击事件
26 | "disableLegendClickEventForPieChart" -> disableLegendClickEventForPieChart() //禁用饼图图表的图例点击事件
27 | "customLegendItemClickEvent" -> customLegendItemClickEvent() //自定义图例点击事件
28 | else -> disableLegendClickEventForNormalChart()
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/JSFunctionForAAOptionsActivity.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
6 | import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
7 | import com.github.aachartmodel.aainfographics.demo.R
8 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.configureColorfulDataLabelsForPieChart
9 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.customDoubleXAxesChart
10 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.customizeEveryDataLabelSinglelyByDataLabelsFormatter
11 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction
12 |
13 | class JSFunctionForAAOptionsActivity : AppCompatActivity() {
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
17 | val intent = intent
18 | val chartType = intent.getStringExtra("chartType")
19 | val aaOptions: AAOptions = chartConfigurationWithSelectedIndex(chartType)
20 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
21 | aaChartView.aa_drawChartWithChartOptions(aaOptions)
22 | }
23 |
24 | fun chartConfigurationWithSelectedIndex(chartType: String?): AAOptions {
25 | return when (chartType) {
26 | "customDoubleXAxesChart" -> customDoubleXAxesChart() //自定义双 X 轴图表
27 | "disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction" -> disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction() //禁用柱状图图表的选中状态
28 | "customizeEveryDataLabelSinglelyByDataLabelsFormatter" -> customizeEveryDataLabelSinglelyByDataLabelsFormatter() //自定义每个数据点的数据标签内容
29 | "configureColorfulDataLabelsForPieChart" -> configureColorfulDataLabelsForPieChart() //为饼图图表配置多彩的数据标签
30 | else -> customDoubleXAxesChart()
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/OnlyRefreshChartDataActivity.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
29 |
30 | import android.os.Bundle
31 | import android.os.Handler
32 | import androidx.appcompat.app.AppCompatActivity
33 |
34 | import com.github.aachartmodel.aainfographics.aachartcreator.*
35 | import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
36 | import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
37 | import com.github.aachartmodel.aainfographics.demo.R
38 | import kotlin.math.cos
39 | import kotlin.math.sin
40 |
41 | class OnlyRefreshChartDataActivity : AppCompatActivity() {
42 | private var aaChartModel = AAChartModel()
43 | private var aaChartView: AAChartView? = null
44 | private var updateTimes: Int = 0
45 |
46 | override fun onCreate(savedInstanceState: Bundle?) {
47 | super.onCreate(savedInstanceState)
48 | setContentView(R.layout.activity_only_refresh_chart_data)
49 |
50 | setUpAAChartView()
51 | repeatUpdateChartData()
52 | }
53 |
54 |
55 | fun setUpAAChartView() {
56 | aaChartView = findViewById(R.id.AAChartView)
57 | aaChartModel = configureAAChartModel()
58 | val aaOptions: AAOptions = aaChartModel.aa_toAAOptions()
59 | if (aaChartModel.chartType == AAChartType.Column) {
60 | aaOptions.plotOptions?.column!!
61 | .groupPadding(0f)
62 | .pointPadding(0f)
63 | .borderRadius(5f)
64 | } else if (aaChartModel.chartType == AAChartType.Bar) {
65 | aaOptions.plotOptions?.bar!!
66 | .groupPadding(0f)
67 | .pointPadding(0f)
68 | .borderRadius(5f)
69 | }
70 | aaChartView?.aa_drawChartWithChartOptions(aaOptions)
71 | }
72 |
73 | private fun configureAAChartModel(): AAChartModel {
74 | val aaChartModel = configureChartBasicContent()
75 | aaChartModel.series(this.configureChartSeriesArray() as Array)
76 | return aaChartModel
77 | }
78 |
79 | private fun configureChartBasicContent(): AAChartModel {
80 | val intent = intent
81 | val chartType = intent.getStringExtra("chartType")
82 | return AAChartModel.Builder(this)
83 | .setChartType(convertStringToEnum(chartType!!))
84 | .setXAxisVisible(true)
85 | .setYAxisVisible(false)
86 | .setTitle("")
87 | .setYAxisTitle("摄氏度")
88 | .setColorsTheme(arrayOf(
89 | AAGradientColor.Sanguine,
90 | AAGradientColor.DeepSea,
91 | AAGradientColor.NeonGlow,
92 | AAGradientColor.WroughtIron
93 | ))
94 | .setStacking(AAChartStackingType.Normal)
95 | .build()
96 | }
97 |
98 | private fun convertStringToEnum(chartTypeStr: String): AAChartType {
99 | var chartTypeEnum = AAChartType.Column
100 | when (chartTypeStr) {
101 | AAChartType.Column.value -> chartTypeEnum = AAChartType.Column
102 | AAChartType.Bar.value -> chartTypeEnum = AAChartType.Bar
103 | AAChartType.Area.value -> chartTypeEnum = AAChartType.Area
104 | AAChartType.Areaspline.value -> chartTypeEnum = AAChartType.Areaspline
105 | AAChartType.Line.value -> chartTypeEnum = AAChartType.Line
106 | AAChartType.Spline.value -> chartTypeEnum = AAChartType.Spline
107 | AAChartType.Scatter.value -> chartTypeEnum = AAChartType.Scatter
108 | }
109 | return chartTypeEnum
110 | }
111 |
112 | @Suppress("UNCHECKED_CAST")
113 | private fun configureChartSeriesArray(): Array {
114 | val maxRange = 40
115 | val numberArr1 = arrayOfNulls(maxRange)
116 | val numberArr2 = arrayOfNulls(maxRange)
117 | var y1: Double
118 | var y2: Double
119 | val max = 38
120 | val min = 1
121 | val random = (Math.random() * (max - min) + min).toInt()
122 | for (i in 0 until maxRange) {
123 | y1 = sin(random * (i * Math.PI / 180)) + i * 2 * 0.01
124 | y2 = cos(random * (i * Math.PI / 180)) + i * 3 * 0.01
125 | numberArr1[i] = y1
126 | numberArr2[i] = y2
127 | }
128 | return arrayOf(
129 | AASeriesElement()
130 | .name("2017")
131 | .data(numberArr1 as Array),
132 | AASeriesElement()
133 | .name("2018")
134 | .data(numberArr2 as Array),
135 | AASeriesElement()
136 | .name("2019")
137 | .data(numberArr1 as Array),
138 | AASeriesElement()
139 | .name("2020")
140 | .data(numberArr2 as Array)
141 | )
142 | }
143 |
144 | private fun repeatUpdateChartData() {
145 | val mStartVideoHandler = Handler()
146 |
147 | val mStartVideoRunnable: Runnable = object : Runnable {
148 |
149 | override fun run() {
150 | val seriesArr = configureChartSeriesArray()
151 | aaChartView!!.aa_onlyRefreshTheChartDataWithChartOptionsSeriesArray(seriesArr)
152 |
153 | mStartVideoHandler.postDelayed(this, 1000)
154 | updateTimes += 1
155 |
156 | print("图表数据正在刷新,刷新次数为:$updateTimes")
157 | }
158 | }
159 |
160 | mStartVideoHandler.postDelayed(mStartVideoRunnable, 2000)
161 | }
162 |
163 |
164 | }
165 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/additionalcontent/ScrollingUpdateDataActivity.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.demo.additionalcontent
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.github.aachartmodel.aainfographics.demo.R
6 |
7 |
8 | class ScrollingUpdateDataActivity : AppCompatActivity() {
9 |
10 | override fun onCreate(savedInstanceState: Bundle?) {
11 | super.onCreate(savedInstanceState)
12 | setContentView(R.layout.activity_scrolling_update_data)
13 | }
14 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/basiccontent/MixedChartActivity.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.demo.basiccontent
29 |
30 | import android.os.Bundle
31 | import androidx.appcompat.app.AppCompatActivity
32 |
33 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel
34 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
35 | import com.github.aachartmodel.aainfographics.demo.R
36 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.MixedChartComposer
37 |
38 | class MixedChartActivity : AppCompatActivity() {
39 | private var aaChartModel: AAChartModel? = null
40 |
41 |
42 | override fun onCreate(savedInstanceState: Bundle?) {
43 | super.onCreate(savedInstanceState)
44 | setContentView(R.layout.activity_mixed_chart)
45 |
46 | val intent = intent
47 | val chartType = intent.getStringExtra("chartType")
48 |
49 | this.aaChartModel = configureTheAAChartModel(chartType!!)
50 |
51 | aaChartModel = configureTheAAChartModel(chartType)
52 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
53 | aaChartView.aa_drawChartWithChartModel(aaChartModel!!)
54 | }
55 |
56 |
57 | private fun configureTheAAChartModel(chartType: String): AAChartModel {
58 | when (chartType) {
59 | "arearangeMixedLine" -> return MixedChartComposer.arearangeMixedLine()
60 | "columnrangeMixedLine" -> return MixedChartComposer.configureColumnrangeMixedLineChart()
61 | "stackingColumnMixedLine" -> return MixedChartComposer.configureStackingColumnMixedLineChart()
62 | "dashStyleTypeMixed" -> return MixedChartComposer.dashStyleTypeMixedChart()
63 | "negativeColorMixed" -> return MixedChartComposer.negativeColorMixedChart()
64 | "scatterMixedLine" -> return MixedChartComposer.scatterMixedLine()
65 | "negativeColorMixedBubble" -> return MixedChartComposer.negativeColorMixedBubble()
66 | "polygonMixedScatter" -> return MixedChartComposer.polygonMixedScatter()
67 | "polarChartMixed" -> return MixedChartComposer.polarChartMixedChart()
68 | "configurePieMixedLineMixedColumnChart" -> return MixedChartComposer.configurePieMixedLineMixedColumnChart()
69 | "configureNegativeColorMixedAreasplineChart" -> return MixedChartComposer.configureNegativeColorMixedAreasplineChart()
70 | }
71 | return MixedChartComposer.arearangeMixedLine()
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/basiccontent/MyBaseExpandableListAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.demo.basiccontent
2 |
3 | import android.content.Context
4 | import android.graphics.Color
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import android.widget.BaseExpandableListAdapter
9 | import android.widget.TextView
10 | import com.github.aachartmodel.aainfographics.demo.R
11 |
12 | class MyBaseExpandableListAdapter(
13 | private val gData: Array,
14 | private val iData: Array>,
15 | private val mContext: Context,
16 | private val colorsArr: Array = arrayOf("#5470c6",
17 | "#91cc75",
18 | "#fac858",
19 | "#ee6666",
20 | "#73c0de",
21 | "#3ba272",
22 | "#fc8452",
23 | "#9a60b4",
24 | "#ea7ccc",
25 | "#5470c6",
26 | "#91cc75",
27 | "#fac858",
28 | "#ee6666",
29 | "#73c0de",
30 | "#3ba272",
31 | "#fc8452",
32 | "#9a60b4",
33 | "#ea7ccc"
34 | )
35 | ) :
36 | BaseExpandableListAdapter() {
37 | override fun getGroupCount(): Int {
38 | return gData.size
39 | }
40 |
41 | override fun getChildrenCount(groupPosition: Int): Int {
42 | return iData[groupPosition].count()
43 | }
44 |
45 | override fun getGroup(groupPosition: Int): String {
46 | return gData[groupPosition]
47 | }
48 |
49 | override fun getChild(groupPosition: Int, childPosition: Int): String {
50 | return iData[groupPosition][childPosition]
51 | }
52 |
53 | override fun getGroupId(groupPosition: Int): Long {
54 | return groupPosition.toLong()
55 | }
56 |
57 | override fun getChildId(groupPosition: Int, childPosition: Int): Long {
58 | return childPosition.toLong()
59 | }
60 |
61 | override fun hasStableIds(): Boolean {
62 | return false
63 | }
64 |
65 | //取得用于显示给定分组的视图. 这个方法仅返回分组的视图对象
66 | override fun getGroupView(
67 | groupPosition: Int,
68 | isExpanded: Boolean,
69 | convertView: View?,
70 | parent: ViewGroup
71 | ): View? {
72 | var convertView = convertView
73 | val groupHolder: ViewHolderGroup
74 | if (convertView == null) {
75 | convertView = LayoutInflater.from(mContext).inflate(
76 | R.layout.item_exlist_group, parent, false
77 | )
78 | groupHolder = ViewHolderGroup()
79 | groupHolder.tv_group_name = convertView.findViewById(R.id.tv_group_name) as TextView
80 | convertView.tag = groupHolder
81 | } else {
82 | groupHolder = convertView.tag as ViewHolderGroup
83 | }
84 | groupHolder.tv_group_name!!.text = gData[groupPosition]
85 | return convertView
86 | }
87 |
88 | //取得显示给定分组给定子位置的数据用的视图
89 | override fun getChildView(
90 | groupPosition: Int,
91 | childPosition: Int,
92 | isLastChild: Boolean,
93 | convertView: View?,
94 | parent: ViewGroup
95 | ): View? {
96 | var convertView = convertView
97 | val itemHolder: ViewHolderItem
98 | if (convertView == null) {
99 | convertView = LayoutInflater.from(mContext).inflate(
100 | R.layout.item_exlist_item, parent, false
101 | )
102 | itemHolder = ViewHolderItem()
103 | itemHolder.tv_color_dot = convertView.findViewById(R.id.tv_color_dot) as TextView
104 | itemHolder.tv_name = convertView.findViewById(R.id.tv_name) as TextView
105 | convertView.tag = itemHolder
106 | } else {
107 | itemHolder =
108 | convertView.tag as ViewHolderItem
109 | }
110 | val colorStr = colorsArr[groupPosition]
111 | itemHolder.tv_color_dot?.setTextColor(Color.parseColor(colorStr))
112 | itemHolder.tv_name?.text = iData[groupPosition][childPosition]
113 | return convertView
114 | }
115 |
116 | //设置子列表是否可选中
117 | override fun isChildSelectable(groupPosition: Int, childPosition: Int): Boolean {
118 | return true
119 | }
120 |
121 | private class ViewHolderGroup {
122 | var tv_group_name: TextView? = null
123 | }
124 |
125 | private class ViewHolderItem {
126 | var tv_color_dot: TextView? = null
127 | var tv_name: TextView? = null
128 | }
129 |
130 | }
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/basiccontent/SpecialChartActivity.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
3 | * ◉◉◉................................................... ◉◉◉
4 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
5 | * ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
6 | * ◉◉◉................................................... ◉◉◉
7 | * ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
8 | */
9 |
10 | /**
11 |
12 | * -------------------------------------------------------------------------------
13 | *
14 | * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
15 | *
16 | * Please contact me on GitHub,if there are any problems encountered in use.
17 | * GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
18 | * -------------------------------------------------------------------------------
19 | * And if you want to contribute for this project, please contact me as well
20 | * GitHub : https://github.com/AAChartModel
21 | * StackOverflow : https://stackoverflow.com/users/7842508/codeforu
22 | * JianShu : http://www.jianshu.com/u/f1e6753d4254
23 | * SegmentFault : https://segmentfault.com/u/huanghunbieguan
24 | *
25 | * -------------------------------------------------------------------------------
26 |
27 | */
28 | package com.github.aachartmodel.aainfographics.demo.basiccontent
29 |
30 | import android.os.Bundle
31 | import androidx.appcompat.app.AppCompatActivity
32 |
33 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel
34 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
35 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
36 | import com.github.aachartmodel.aainfographics.aachartcreator.AAClickEventMessageModel
37 | import com.github.aachartmodel.aainfographics.aachartcreator.AAMoveOverEventMessageModel
38 | import com.github.aachartmodel.aainfographics.demo.R
39 | import com.github.aachartmodel.aainfographics.demo.chartcomposer.SpecialChartComposer
40 | import com.google.gson.Gson
41 | import com.google.gson.GsonBuilder
42 |
43 | class SpecialChartActivity : AppCompatActivity(),
44 | AAChartView.AAChartViewCallBack {
45 |
46 | // private var aaChartModel: AAChartModel? = null
47 |
48 | override fun onCreate(savedInstanceState: Bundle?) {
49 | super.onCreate(savedInstanceState)
50 | setContentView(R.layout.activity_special_chart)
51 |
52 | val intent = intent
53 | val chartType = intent.getStringExtra("chartType")
54 |
55 | val aaChartModel = configureChartModelWithChartType(chartType!!)
56 | aaChartModel.clickEventEnabled(true)
57 | .touchEventEnabled(true)
58 |
59 | val aaChartView: AAChartView = findViewById(R.id.AAChartView)
60 | aaChartView.callBack = this
61 | aaChartView.aa_drawChartWithChartModel(aaChartModel)
62 | }
63 |
64 | private fun configureChartModelWithChartType(chartType: String): AAChartModel {
65 | when (chartType) {
66 | AAChartType.Column.value -> return SpecialChartComposer.configurePolarColumnChart()
67 | AAChartType.Bar.value -> return SpecialChartComposer.configurePolarBarChart()
68 | AAChartType.Line.value -> return SpecialChartComposer.configurePolarLineChart()
69 | AAChartType.Area.value -> return SpecialChartComposer.configurePolarAreaChart()
70 | AAChartType.Pie.value -> return SpecialChartComposer.configurePieChart()
71 | AAChartType.Bubble.value -> return SpecialChartComposer.configureBubbleChart()
72 | AAChartType.Scatter.value -> return SpecialChartComposer.configureScatterChart()
73 | AAChartType.Arearange.value -> return SpecialChartComposer.configureArearangeChart()
74 | AAChartType.Areasplinerange.value -> return SpecialChartComposer.configureAreasplinerangeChart()
75 | AAChartType.Columnrange.value -> return SpecialChartComposer.configureColumnrangeChart()
76 | AAChartType.Spline.value -> return SpecialChartComposer.configureStepLineChart()
77 | AAChartType.Areaspline.value -> return SpecialChartComposer.configureStepAreaChart()
78 | AAChartType.Boxplot.value -> return SpecialChartComposer.configureBoxplotChart()
79 | AAChartType.Waterfall.value -> return SpecialChartComposer.configureWaterfallChart()
80 | AAChartType.Pyramid.value -> return SpecialChartComposer.configurePyramidChart()
81 | AAChartType.Funnel.value -> return SpecialChartComposer.configureFunnelChart()
82 | AAChartType.Errorbar.value -> return SpecialChartComposer.configureErrorbarChart()
83 | AAChartType.Gauge.value -> return SpecialChartComposer.configureGaugeChart()
84 | AAChartType.Polygon.value -> return SpecialChartComposer.configurePolygonChart()
85 | }
86 |
87 | return SpecialChartComposer.configurePolarColumnChart()
88 |
89 | }
90 |
91 | override fun chartViewDidFinishLoad(aaChartView: AAChartView) {
92 | //do nothing
93 | }
94 |
95 | override fun chartViewClickEventMessage(
96 | aaChartView: AAChartView,
97 | clickEventMessage: AAClickEventMessageModel
98 | ) {
99 | val gson = GsonBuilder().setPrettyPrinting().create()
100 | val clickEventMessageModelJson = gson.toJson(clickEventMessage)
101 |
102 | // 打印点击事件信息
103 | println("🖱🖱🖱获取点击事件 clickMessageModel = $clickEventMessageModelJson")
104 | }
105 |
106 |
107 | override fun chartViewMoveOverEventMessage(
108 | aaChartView: AAChartView,
109 | messageModel: AAMoveOverEventMessageModel
110 | ) {
111 | //do nothing
112 | }
113 |
114 |
115 | }
116 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/github/aachartmodel/aainfographics/demo/chartcomposer/AAChartSymbolConst.kt:
--------------------------------------------------------------------------------
1 | package com.github.aachartmodel.aainfographics.demo.chartcomposer
2 |
3 | import com.github.aachartmodel.aainfographics.aachartcreator.AAChartSymbolType
4 |
5 | val predefinedSymbol1 = AAChartSymbolType.Triangle.value
6 | val predefinedSymbol2 = AAChartSymbolType.Circle.value
7 | val imageSymbol = "url(https://www.highcharts.com/samples/graphics/sun.png)"
8 | val base64Symbol =
9 | "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5Si +ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVi +pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+ 1dT1gvWd+ 1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx+ 1/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb+ 16EHTh0kX/i +c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAVVJREFUeNpi/P37NwOxYM2pHtm7lw8uYmBgYGAiVtPC3RWh+88vuneT474Dv4DkcUZibJy8PG72le/nkn+zMzAaMhnNyY1clMpCjKbz/86lMLAzMMA0MTAwMOC1Ea6JgYFB9pPwncbMg6owOaY1p3pk15zqkcWnie8j63ddY18nZHmWI2eW3vzN/Jf168c3UfGuHathAXHl+7lkBnYGBtafDP8NVd3jQ8xKHiNrZMyeqPPtE/9vTgYGBgb1H4oHlHXt43ZfWfDwNzsDIwMDA4POX831RXGrg9BdxLhob63VgTurjsAUsv5k+A9jC3/g/NCdfVoQm/+ZIu3qjhnyW3XABJANMNL19cYVcPBQrZpq9eyFwCdJmIT6D8UD5cmbHXFphKccI9Mgc84vTH9goYhPE4rGELOSx0bSjsUMDAwMunJ2FQST0+/fv1Hw5BWJbehi2DBgAHTKsWmiz+rJAAAAAElFTkSuQmCC)"
10 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_custom_style_chart.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_custom_tooltip_with_jsfunction.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_double_charts_linked_work.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
24 |
25 |
26 |
31 |
32 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_draw_chart_with_aaoptions.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_evaluate_jsstring_function.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_hide_or_show_chart_series.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_jsfunction_for_aachart_events.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_mixed_chart.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_only_refresh_chart_data.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_scollable_chart.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_scrolling_update_data.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_special_chart.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/item_exlist_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
21 |
22 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/item_exlist_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
16 |
17 |
31 |
32 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AAChartModel/AAChartCore-Kotlin/05c90646f7152834b2e392f554dcc5255b5d6a6d/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 | #FFFFFF
7 | #000000
8 | #41c574
9 | #5992d2
10 | #EAA033
11 | #D7063B
12 | #F2F2F2
13 | #F4F3F3
14 | #333333
15 | #666666
16 | #4b2b7f
17 |
18 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AAInfographics
3 |
4 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | rootProject.name = "AAChartCore-Kotlin"
2 | include("charts", "sample")
--------------------------------------------------------------------------------