Getting started
To get started with Vico, ensure that the Maven Central repository is added to your project and that minSdk
is set to at least 16 (for the view system) or at least 21 (for Jetpack Compose). Add Vico to your Gradle version catalog as follows, removing what you don’t need.
[versions]
vico = "1.15.0"
[libraries]
# For Jetpack Compose.
vico-compose = { group = "com.patrykandpatrick.vico", name = "compose", version.ref = "vico" }
# For `compose`. Creates a `ChartStyle` based on an M2 Material Theme.
vico-compose-m2 = { group = "com.patrykandpatrick.vico", name = "compose-m2", version.ref = "vico" }
# For `compose`. Creates a `ChartStyle` based on an M3 Material Theme.
vico-compose-m3 = { group = "com.patrykandpatrick.vico", name = "compose-m3", version.ref = "vico" }
# Houses the core logic for charts and other elements. Included in all other modules.
vico-core = { group = "com.patrykandpatrick.vico", name = "core", version.ref = "vico" }
# For the view system.
vico-views = { group = "com.patrykandpatrick.vico", name = "views", version.ref = "vico" }
Then add Vico to the module where you’d like to use it.
dependencies {
implementation(libs.vico.compose)
implementation(libs.vico.compose.m2)
implementation(libs.vico.compose.m3)
implementation(libs.vico.core)
implementation(libs.vico.views)
}
If you’re not using version catalogs, you can add Vico to your project like so:
dependencies {
// For Jetpack Compose.
implementation("com.patrykandpatrick.vico:compose:1.15.0")
// For `compose`. Creates a `ChartStyle` based on an M2 Material Theme.
implementation("com.patrykandpatrick.vico:compose-m2:1.15.0")
// For `compose`. Creates a `ChartStyle` based on an M3 Material Theme.
implementation("com.patrykandpatrick.vico:compose-m3:1.15.0")
// Houses the core logic for charts and other elements. Included in all other modules.
implementation("com.patrykandpatrick.vico:core:1.15.0")
// For the view system.
implementation("com.patrykandpatrick.vico:views:1.15.0")
}