Still in order to commemorate the death of my scriptshit application, namely web-based and android GIS, because Google has closed their Google Fusion Table service, effective 1 year after the closure of their Google Plus, so I plan to review important points that can still be implemented until now, including about Chart. Luckily the programmer of this library is still strong and continues to develop their work. The 2 libraries are MPAndroidChart and AnyChart-Android.
1. MPAndroidChart
A powerful & easy to use chart library for Android
That's their jargon, apart from that they also develop for the IOS platform, HERE .
MPAndroidChart is a free software, or rather a free android studio library. As a result, dynamic & realtime data is not officially supported by Android / Google, so this is purely their enthusiasm (3rd party developer). If you are looking for an enterprise-grade charting solution with extreme real-time performance and technical support, we recommend using SciChart Android .
In addition, we also recommend that you continue to monitor my site, every week there will be updates regarding the implementation of this Chart with the Kotlin language, of course it will depend on how much demand you have.
Okay, the reason I used MPAndroidChart for scripting was because it was very easy to implement and of course because I was still a newbie, so I didn't need to import AAR files like AnyChart-Android.
Simply add the library to your Android project, like this.
Gradle Setup
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}
In the past, I used this library to create a Pie Chart, if you want to learn more about how to create other chart models, please read the documentation yourself, HERE .
2. AnyChart Android
This is another great data visualization library for creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
As I mentioned before, using this library requires importing the AAR file, so pay close attention to how to install it in Android Studio.
Gradle
You have to make sure that you have to open the application/root level gradle file, and place the maven configuration right above the closing curly bracket of the repositories or in other words, make sure that this maven configuration is at the bottom among the libraries in the scope of the repositories.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Next, point your workplace to the project level gradle file, and add the following configuration.
dependencies {
implementation 'com.github.AnyChart:AnyChart-Android:1.1.2'
}
JAR/AAR File
Copy the AAR file to the libs folder of the application project.
- Right click the project directory, select "Open Module Settings".
- Click the + button in the top left corner to add a new module.
- Select "Import .JAR or .AAR package".
- Find the AAR file.
- Go back to the dependencies tab and add this AAR module as a dependency.
If you want to learn more, or want to learn from sample examples, please go HERE .
That's all, hope it's useful!