Vico

Getting started

Prerequisites

Ensure these two things:

Version catalog

Add the modules you need to your Gradle version catalog:

[versions]
vico = "2.0.0-beta.4"
 
[libraries]
# For Jetpack Compose.
vico-compose = { group = "com.patrykandpatrick.vico", name = "compose", version.ref = "vico" }
 
# For Material 2 theming in Jetpack Compose.
vico-compose-m2 = { group = "com.patrykandpatrick.vico", name = "compose-m2", version.ref = "vico" }
 
# For Material 3 theming in Jetpack Compose.
vico-compose-m3 = { group = "com.patrykandpatrick.vico", name = "compose-m3", version.ref = "vico" }
 
# Houses the core logic. This is included in all other modules, so add it explicitly only
# in the unlikely event that you don’t need anything else.
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)
}

Legacy

If you don’t have a version catalog, add Vico to your project like so:

val vicoVersion = "2.0.0-beta.4"
dependencies {
    // For Jetpack Compose.
    implementation("com.patrykandpatrick.vico:compose:$vicoVersion")
 
    // For Material 2 theming in Jetpack Compose.
    implementation("com.patrykandpatrick.vico:compose-m2:$vicoVersion")
 
    // For Material 3 theming in Jetpack Compose.
    implementation("com.patrykandpatrick.vico:compose-m3:$vicoVersion")
 
    /* Houses the core logic. This is included in all other modules, so add it explicitly
    only in the unlikely event that you don’t need anything else. */
    implementation("com.patrykandpatrick.vico:core:$vicoVersion")
 
    // For the view system.
    implementation("com.patrykandpatrick.vico:views:$vicoVersion")
}