Let's see step-by-step how to integrate Charts-kt in an Android application.

In this tutorial you will :

  1. Create a minimal android application with one activity
  2. Configure your build to import the needed libraries
  3. Create your first chart

What do you need?

Creating the Android project

From Android Studio (or Intellij idea), start by select create new project and choose Empty Activity.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/87045a58-088d-416a-b445-d279deed40c5/CleanShot_2021-04-15_at_11.52.002x.png

Click next, give a name and choose the minimum SDK you want to use for your app.

In our case, we choose API 17 to have a charts application compatible with more than 99% of devices (it's also the minimum version allowed for Charts.kt).

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ddc5c9e7-ada6-4fb9-aa4f-8ae945823734/Untitled.png

Click Finish and wait for the ide to finish the synchronization of the project. Validate your project by running the application in the emulator.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9ec9b05e-5526-4820-8b8c-55baa085fc57/Untitled.png

You should see the resulting Hello World

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5b6ce917-52f9-4169-a80b-80544b44b5c1/Untitled.png