The guide is being migrated; some links to the API reference may be missing. Use the search bar in the API reference.

VicoTheme

Overview

VicoTheme houses default chart colors. Functions like rememberColumnCartesianLayer and rememberLineCartesianLayer use these for their default arguments. You can use ProvideVicoTheme to provide a custom instance. Use vicoTheme to access the provided value (for example, vicoTheme.textColor).

ProvideVicoTheme(remember(/* ... */) { VicoTheme(/* ... */) }) { /* ... */ }

Material theming

You can use rememberM2VicoTheme or rememberM3VicoTheme to create a VicoTheme with the colors from your app’s Material Theme. These functions come from the compose-m2 and compose-m3 modules.

ProvideVicoTheme(rememberM2VicoTheme()) { /* ... */ }
ProvideVicoTheme(rememberM3VicoTheme()) { /* ... */ }